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
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...
- Create admin user?
I'm not really sure how this is supposed to work, I installed Appwrite through docker-compose and set it up. When I launched the app and went into it, I created...