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
- education plan not activated
Hi I have an edu id 13103046@iubat.edu but when I am trying to claim my plan and trying to logging with github where education student plan active. the appwrite...
- I'm getting an error on the console "j?....
On my self hosted instance version 1.8.1 the console is giving me this error when trying to view the rows for a table I recently created. My application is read...
- 500 simultaneous OAuth logins from the s...
Hi, I'd like to ask about rate limiting around Google OAuth login on Appwrite Cloud. **OVERVIEW** Service type: A PWA (web app) for members of a university clu...