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
- Docker Error: efe793689....... docker: E...
I am using selfhosted appwrite in vps and everything else is running except functions 2024-10-20T03:39:15.219114970Z [Job] (67147b633202b8.77233019) successfu...
- Restrict access to console with AWS
Hey everyone, does anyone know how to restrict access to the Appwrite console? Self hosting on AWS with the marketplace template
- expo stuck on splash screen after build
Can anyone help me with an issue in my Expo app? After logging in and redirecting to the homepage, the app gets stuck on the splash screen. This issue only occu...