Skip to content
Back

Permissions error

  • 0
  • Databases
  • React Native
cBasique
12 Feb, 2026, 21:22

I try to create a row in my table but when i submit i have an error on my permission, i'm new on it so i dont understand the error. I have Row Security enable

export const createGoal = async ( { exercise, progress, total, }: CreateGoalParams ) => { const currentUser = await getCurrentUser(); if ( !currentUser ) { throw new Error( "Utilisateur non connecté" ); }

// Vérifier limite objectifs actifs const existingGoals = await getGoalsFromUser(); const activeGoals = existingGoals.filter( ( g ) => g.state === "in-progress" );

if ( activeGoals.length >= LIMITS.MAX_GOALS ) { return { message: { title: "Limite atteinte", body: Maximum ${LIMITS.MAX_GOALS} objectifs en cours., }, }; }

const newRow = await tablesDB.createRow( { databaseId, tableId: goalTable, rowId: ID.unique(), data: { exercise, progress, targetValue: total, progressHistory: [ progress ], state: "in-progress", }, permissions: [ Permission.read( Role.user( currentUser.$id ) ), Permission.update( Role.user( currentUser.$id ) ), Permission.delete( Role.user( currentUser.$id ) ), ], } );

const goal = await buildGoalObject( newRow );

return { goal, message: { title: "Objectif créé", body: "Votre objectif a été créé avec succès.", }, }; };

TL;DR
Error message: Permissions must be one of: (any, users, user:68f7a373002bb5e49748, user:68f7a373002bb5e49748/verified, users/verified). When creating a row in a table, ensure that permissions are set correctly. Solution: Check and adjust the permissions set in the `createGoal` function as per the error message requirements.
cBasique
12 Feb, 2026, 21:26

Did i just have to add all user permissions on the table ?

cBasique
12 Feb, 2026, 21:46

LOG [AppwriteException: Permissions must be one of: (any, users, user:68f7a373002bb5e49748, user:68f7a373002bb5e49748/verified, users/verified)]

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more