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
- Appwrite DNS nameservers return SERVFAIL...
My custom domain demomanasa.online (and all its subdomains) stopped resolving with ERR_NAME_NOT_RESOLVED for all visitors. I have traced the failure to Appwrite...
- Framework categorization for Sites
Hello, I want to deploy my web app via Appwrite SItes. My web app is vite+reactjs. In the Appwrite docs, it creates a vite+react app, and chooses React from the...
- Attribute not found in schema on REST AP...
I'm querying a appwrite collection via the REST API on appwrite cloud 1.9.5 (no SDK) via a cloudflare worker and keep getting: ``` {"message":"Invalid query: A...