App::301::perm

DESCRIPTION

Basic permissions storage and management (ACL tables)

DEPENDS

FUNCTIONS

get_roles()

Get list of roles with permissions of user, or group This is not list of roles setup on entity!

my %roles=App::301::perm::get_roles(
  'ID_user' => $main::USRM{'ID_user'},
  'ID_group' => '*',
  'enhanced' => 1,
);

_get_functions_from_roles

Converts %roles into %functions

my %functions

get_ACL_roles

Get list of roles from ACL and ACL_role

Return list of roles and permissions computed from users and user_groups (organizations has only informal, not executive character in ACL)

my (%roles,$perm)=App::301::perm::get_ACL_roles(
  'r_prefix' => 
       'r_table' => 
       'r_ID_entity' => 
)

get_entity_roles()

Get list of roles in one entity for user and groups

Gets everyone group listen in ACL and where the present use is contained - for example: world - 'r ' editor - 'rwx' another - 'r--' The output are roles with 'r ' privileges from 'world' group, roles from editor with 'rwx' privileges, etc... All privileges are in output stripped by optimistic permissions from all groups 'r '+'rwx'+'r--' = 'rwx', for example 'r '+'r--'+'-w-' = 'rw-'

After this gets roles from user if are present in this ACL list. Defined permissions overrides group permissions. for example 'rw-'+'rwx'='rwx'. Warning! - only defined roles in user ACL list definition overrides other roles.

get_entity_sum_roles

Get list of roles in entity and depends for user

get_owner()

Read owner from entity, users external function in format App::aXX::a301::get_owner() when defined, otherwise own blind function (reads posix_owner from table).

my $owner=App::301::perm::get_owner(
 'r_prefix' =>
 'r_table' =>
 'r_ID_entity' =>
);

get_ACL

Returns ACL (users, user_groups and organizations) from entity

my @ACL=App::301::perm::get_ACL(
 'r_prefix' =>
 'r_table' =>
 'r_ID_entity' =>
 'role' => # only entities with this role
);

set_ACL

Sets ACL (users, user_groups and organizations) for entity

App::301::perm::set_ACL(
 'r_prefix' =>
 'r_table' =>
 'r_ID_entity' =>
 'role' => # set this role to all entities
 'ACL' => (
   {'ID' => 'xxxxxx', folder => ''}, # user
   {'ID' => 2, 'folder' => 'Y'}, # group
   {'ID' => 3, 'folder' => 'O'}, # org
 )
);

ACL_org_update

Update or add organization (a710_org) into entity ACL

App::301::perm::ACL_org_update(
  'ID' => # ref a710_org.ID_entity
       'r_prefix' => 
       'r_table' => 
       'r_ID_entity' => 
)

ACL_org_remove

Remove organization (a710_org) from entity ACL

App::301::perm::ACL_org_remove(
  'ID' => # ref a710_org.ID_entity
       'r_prefix' => 
       'r_table' => 
       'r_ID_entity' => 
)

AUTHORS

Comsultia, Ltd. (open@comsultia.com)


If published informations are not helpfull, something is missing or wrong, please report. Thanx for contribution.
This content is generated from file 'http://svn.cyclone3.org/trunk/frame/_addons/App/301/perm.pm'

AddThis Social Bookmark Button RSS

User Comments