async function createUserDB(
id: UserId,
values: CreateUserParams
): Promise<User> {
const { databases } = await createAdminClient();
const document = await databases.createDocument<User>(
envi.NEXT_PUBLIC_DATABASE_ID,
envi.NEXT_PUBLIC_USERS_COLLECTION_ID,
id,
values,
[
Permission.read(Role.any()),
Permission.update(Role.user(id)),
Permission.delete(Role.user(id)),
]
);
return document;
}
i added read, update and delete permissions, can u explain what create Permission means here?
yep In first here anyone can read your database of Your project on the other hand last two permissions are users can update & delete
what about create Permission.create()
if i add here [Permission.create(Role.user(id)),
what will be goal of that?
Recommended threads
- Problem with Google Workspace at DNS Rec...
Hello, I bought a domain at Namecheap, and Google Workspace used to work there, but now that I switched from Custom DNS to Appwrite's nameservers, it doesn't w...
- change role of a team member in Appwrite
It's not possible to add/change roles of a team meber in Appwrite Frontend. When you click on a member of a team you get forwarded to the configuration page of ...
- Session not found. Please run appwrite l...
I have encounter an issue with appwrite CLI They asking for a login session but in the doc, itβs mention that only setup client with endpoint / api key is enou...