
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
- 404 error when navigating to the team fr...
the version i m running is `1.7.4` as far as i can tell everything is working fine except for this weird bug in the video. when monitoring the appwrite and app...
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
- Can not login with OAuth
Hello everyone i am trying to login with ios and android in react native - expo but it is not successful. And this is the code which i am using to login
