Name

DB.DBA.RDF_GRAPH_USER_PERMS_GET — Gets permissions of an the user on a graph.

Synopsis

DB.DBA.RDF_GRAPH_USER_PERMS_GET ( in graph_iri varchar ,
  in uname varchar );
 

Description

Gets permissions of the user named uname on graph specified by graph_iri.

Parameters

graph_iri

Graph IRI.

uname

User name.

Return Types

Returns integer or null.

If the returned value is not null (hence an integer) then the specified user should be an active SQL user or "nobody".

Four sorts of access are returned, 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"

Examples

Example 24.277. Example

Suppose the following Example for Blogs and Resource Sharing .

Get Ana's permissions on a given graph:

SQL> select DB.DBA.RDF_GRAPH_USER_PERMS_GET ('http://example.com/Anna/system', 'Anna');
Query result:
RDF_GRAPH_USER_PERMS_GET
INTEGER
 1
No. of rows in result: 1