Skip to main content

Permissions

Permissions allow the developer to adjust who is able to interact with the storage.

useNilRetrievePermissions

This is used to query the id and what permissions are available. Simply pass in the relevant id

examples-nextjs/app/components/retrieve-permissions.tsx
loading...

useNilUpdatePermissions

To update your permissions for a storage value, you can use these various functions with the UpdatePermissionsBuilder builder

const permissions = useMemo(() => {
return UpdatePermissionsBuilder.init(client)
.revokeRetrieve(client.id)
.revokeDelete(client.id);
}, [client.id]);
examples-nextjs/app/components/update-permissions.tsx
loading...

useNilOverwritePermissions

To overwrite your permissions for a storage value, you can use these various functions with the ValuesPermissionsBuilder builder. In the below example, it overwrites it to the static `default.

examples-nextjs/app/components/overwrite-permissions.tsx
loading...