This is the ThingsDB documentation for version v0, click here for the latest version!
Revoke, collection or general, privileges from a user. See grant for more information on how access privileges can be set for a user.
To use this function, at least EVENT privileges on the @thingsdb scope and GRANT privileges on the target scope are required.
This function generates an event.
revoke(target, user, mask)
| Argument | Type | Description |
|---|---|---|
target |
int/raw | Can be either the @node, @thingsdb, or a @collection scope. |
user |
str | User to revoke privileges from. |
mask |
int | Bit-mask for revoking privileges. |
Returns nil when successful. A lookup_err() is raised if the user or target
does not exist.
Revoke all privileges for user
irison collectionstuff:
revoke('@:stuff', 'iris', FULL);
Return value in JSON format
null