
Hello! I want to create a document but get this error
[AppwriteException: Permissions must be one of: (any, users, user:66f3de0000033ba635fe, user:66f3de0000033ba635fe/verified, users/verified, label:admin)]
This is the function where the error is catched
export const createNewWorkoutplan = async (name, duration, workouts, days,user) => { try { const newWorkoutplan = await databases.createDocument( appwriteConfig.databaseId, appwriteConfig.workoutplanCollectionId, ID.unique(), { Name: name || 'New Workoutplan', Duration: duration, Workouts: workouts, Days: days, CreatedAt: new Date().toISOString(), }, [ Permission.read(Role.user(user.$id),"verified"), Permission.write(Role.user(user.$id),"verified") ] );
return newWorkoutplan;
} catch (error) {
console.error('Error creating workout plan:', error);
throw error;
}
};
in the database my user has all permissions aswell as all users have all rights for the collection
Would be great if anyone can help out!
Recommended threads
- Trouble Getting Google oAuth Working in ...
I am having multiple issues. I had auth and google auth working with clerk. But decided to simplify and just go with appwrite. So fare I can get email working b...
- Domain not working
My domain [fork-fable.appwrite.network](https://fork-fable.appwrite.network/) returns a 500 even after deleting and redeploying. Other domains added in domains ...
- File tokens regenerate each page reload
Hello, on appwrite 1.7.4, when I create a file token via the API Tokens(appwriteAdminClient)#createFileToken I get a secret, then when I check in the console t...
