Name
DB.DBA.RDF_DEFAULT_USER_PERMS_SET — Sets default permissions of user.
Synopsis
DB.DBA.RDF_DEFAULT_USER_PERMS_SET
(
|
in uname varchar , |
in perms integer , | |
in
set_private
integer (default 0)
) ; |
Description
This function sets default permissions of user named uname to the value specified by perms.
Parameters
uname
User name.
perms
If perms is null, then the procedure acts as
DB.DBA.RDF_DEFAULT_USER_PERMS_DEL (uname, set_private)
;
If perms is not null (hence an integer) then the specified user should be an active SQL user or "nobody".
Four sorts of access are specified by four bits of an integer "permission bit-mask", plain old UNIX style:
-
Bit 1 permits read access.
-
Bit 2 permits write access via SPARUL and it's basically useless without bit 1 set.
-
Bit 4 permits write access via "RDF sponge" methods and it's basically useless without bits 1 and 2 set.
-
Bit 8 allows to obtain list of members of graph group; an IRI can be used as graph IRI and as graph group IRI at the same time so bit 8 can be freely combined with any of bits 1, 2 or 4.
For more details see our documentation section "Understanding Default Permissions"
set_private
(0|1 default 0). If set_private is true then the permission is set as default for "private" graphs otherwise it is set for "world" graphs.
Examples
Example 24.256. Example
-- Set 'demo' user/role to have no access to private graphs: DB.DBA.RDF_DEFAULT_USER_PERMS_SET ('demo', 0, 1); -- Set 'demo' user/role ability to read, update, sponge other graphs, assuming bit_or (1,2,4) = 7 : DB.DBA.RDF_DEFAULT_USER_PERMS_SET ('demo', 7, 0);