
== USER ACCESS FACILITY ==

The User access facility (until now) supports only "read only" rights.
that means that if you give access in a user this access will be "read only" access.

you can assign roles to users and roles to nodes
if a node has not any role at all then it is public accessible
if a node is assigned with roles then it is accessible only for users that have at least one of these roles.

the users must be also database users , to create a user in postgresql the command is:
CREATE USER <username>

you can assign roles to user with:

SELECT tree.add_user_to_role(<TREE_NAME>,<USER_NAME>,<ROLE_NAME>);

you can assign roles to nodes with:
SELECT tree.add_node_to_role(<TREE_NAME>,<NODE_SN>,<ROLE_NAME>);

if you want to assign a role to a node located by id:

SELECT tree.add_node_to_role(<NODE_ID>,<ROLE_NAME>);

if the role that you try to assign does not exist then the role  is created.

the simple users have access only to schema rtree and they can use its functions 
with these functions they can have access only to nodes that permited for
theirs roles.

for example if a simple user wants to make a tree traversal:
SELECT * FROM rtree.traverse_tree(<TREE_NAME>);