Creating Document with Relationship resulting error The current user is not authorized to perform
- 1
- Databases
- Web
- Cloud
I have user collection having user details like Table user { user_id integer name string profession string user_qualification ( relationship with user_qualification ) }
I have a qualification collection Table qualification{ qualification_id integer qualification_name string }
and I have user_qualification table
Table user_qualification{ user_id integer (two way relationship with user collection) qualification_id integer ( one way relationship with collection) }
Now I want to allow user to self assign them qualification
so I am having this createDocument call
const addUserQualification = async (req) => {
try{
const userStore = useUserStore()
return await databases.createDocument(
appwriteConfig.databaseId,
appwriteConfig.userQualificationsCollectionId,
ID.unique(),
{
user: userStore.user,
qualification: req
}
)
}catch (e){
throw e
}
}
I am using pinia store, and userStore.user return full user object and req is qualification object. But though user have permission to create and update document
AppwriteException: The current user is not authorized to perform the requested action
Recommended threads
- Method EQUAL not wrking in REST API Quer...
Request: ``` postman request 'https://nyc.cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/rows?queries[]={%22method%22%3A%22select%22%2C%22values%2...
- OIDC not working on Appwrite cloud
tl;dr: same project settings, same OIDC credentials. Auth works on self hosted but not in cloud. I have a project in my self hosted instance with a single web ...
- Is it possible to deploy pre-built Nuxt ...
Hi, is it possible to only deploy the ./.output folder of a Nuxt App that uses server side routes to Appwrite Sites? Background is that the build produced ...