Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Permission Class Reference
+ Inheritance diagram for Permission:
+ Collaboration diagram for Permission:

Public Member Functions

 __construct ($dbaccess= '', $id= '', $res= '', $dbid=0, $computed=true)
 
 PostSelect ()
 
 PostDelete ()
 
 PostUpdate ()
 
 PreInsert ()
 
 postInsert ()
 
 ListUserPermissions ($user, $app)
 
 ListUserApplications ($user)
 
 ListApplicationUsers ($app)
 
 Exists ($userid, $applicationid, $aclid=0)
 
 IsOver ($user, $application, $acl)
 
 GrantLevel ($user, $application)
 
 DelAppPerm ($id)
 
 GetUpPrivileges ()
 
 GetUnPrivileges ()
 
 GetGPrivileges ()
 
 getAllAclForApplication ($appid)
 
 GetComputedPrivileges ($uid, $appid)
 
 computePerm ($uid, $appid, $acl)
 
 GetPrivileges ($force=false, $computed=true)
 
 HasPrivilege ($idacl)
 
 AddUserPermission ($appname, $aclname)
 
 GetActions ()
 
 deletePermission ($id_user=null, $id_application=null, $id_acl=null, $computed=null)
 
- Public Member Functions inherited from DbObj
 __construct ($dbaccess= '', $id= '', $res= '', $dbid=0)
 
 Select ($id)
 
 getValues ()
 
 AffectColumn ($fields)
 
 Affect ($array)
 
 isAffected ()
 
 Complete ()
 
 PreInsert ()
 
 PostInsert ()
 
 PreUpdate ()
 
 PostUpdate ()
 
 PreDelete ()
 
 PostDelete ()
 
 PreSelect ($id)
 
 PostSelect ($id)
 
 Add ($nopost=false, $nopre=false)
 
 Modify ($nopost=false, $sfields="", $nopre=false)
 
 Delete ($nopost=false)
 
 Adds (&$tcopy, $nopost=false)
 
 lw ($prop)
 
 CloseConnect ()
 
 Create ($nopost=false)
 
 PostInit ()
 
 init_dbid ()
 
 exec_query ($sql, $lvl=0, $prepare=false)
 
 numrows ()
 
 fetch_array ($c, $type=PGSQL_ASSOC)
 
 Update ()
 
 savePoint ($point)
 
 rollbackPoint ($point)
 
 commitPoint ($point)
 

Data Fields

 $fields
 
 $id_fields
 
 $dbtable = "permission"
 
 $privileges = array()
 
 $sqlcreate
 
 $actions = array()
 
- Data Fields inherited from DbObj
 $dbid = - 1
 
 $dbaccess = ''
 
 $fields
 
 $dbtable = ''
 
 $criterias = array()
 
 $sup_fields = array()
 
 $sup_where = array()
 
 $sup_tables = array()
 
 $fulltextfields = array()
 
 $order_by = ""
 
 $isset = false
 
 $msg_err = ''
 
 $err_code = ''
 
 $res = null
 
 $debug = false
 

Additional Inherited Members

- Static Public Attributes inherited from DbObj
static $savepoint = array()
 

Detailed Description

Definition at line 27 of file Class.Permission.php.

Constructor & Destructor Documentation

__construct (   $dbaccess = '',
  $id = '',
  $res = '',
  $dbid = 0,
  $computed = true 
)

Definition at line 58 of file Class.Permission.php.

+ Here is the call graph for this function:

Member Function Documentation

AddUserPermission (   $appname,
  $aclname 
)

Definition at line 381 of file Class.Permission.php.

+ Here is the call graph for this function:

computePerm (   $uid,
  $appid,
  $acl 
)

Return the ACL value for a given (user, app, acl), computing it if it's not already computed, and storing the results.

Definition at line 295 of file Class.Permission.php.

DelAppPerm (   $id)

Definition at line 201 of file Class.Permission.php.

deletePermission (   $id_user = null,
  $id_application = null,
  $id_acl = null,
  $computed = null 
)

delete permissions

Definition at line 428 of file Class.Permission.php.

+ Here is the call graph for this function:

Exists (   $userid,
  $applicationid,
  $aclid = 0 
)

Definition at line 158 of file Class.Permission.php.

GetActions ( )

return ACTION list for a user

Author
Philippe VALENCIA pvale.nosp@m.ncia.nosp@m.@fram.nosp@m..fr
Returns
array actions available for current user

Definition at line 402 of file Class.Permission.php.

+ Here is the call graph for this function:

getAllAclForApplication (   $appid)

Get all ACL for a given application

Definition at line 250 of file Class.Permission.php.

GetComputedPrivileges (   $uid,
  $appid 
)

Returns the resulting ACL for a given (user, application), computing ACL value if they are empty.

Definition at line 267 of file Class.Permission.php.

+ Here is the call graph for this function:

GetGPrivileges ( )

return ACL un list for a user

Definition at line 240 of file Class.Permission.php.

+ Here is the call graph for this function:

GetPrivileges (   $force = false,
  $computed = true 
)

return ACL list for a user

Definition at line 305 of file Class.Permission.php.

+ Here is the call graph for this function:

GetUnPrivileges ( )

return ACL un list for a user

Definition at line 230 of file Class.Permission.php.

+ Here is the call graph for this function:

GetUpPrivileges ( )

return ACL up list for a user

Definition at line 220 of file Class.Permission.php.

+ Here is the call graph for this function:

GrantLevel (   $user,
  $application 
)

Definition at line 188 of file Class.Permission.php.

HasPrivilege (   $idacl)

Definition at line 375 of file Class.Permission.php.

IsOver (   $user,
  $application,
  $acl 
)

Definition at line 175 of file Class.Permission.php.

ListApplicationUsers (   $app)

Definition at line 141 of file Class.Permission.php.

ListUserApplications (   $user)

Definition at line 123 of file Class.Permission.php.

ListUserPermissions (   $user,
  $app 
)

Definition at line 106 of file Class.Permission.php.

PostDelete ( )

Definition at line 78 of file Class.Permission.php.

+ Here is the call graph for this function:

postInsert ( )

Definition at line 97 of file Class.Permission.php.

+ Here is the call graph for this function:

PostSelect ( )

Definition at line 73 of file Class.Permission.php.

+ Here is the call graph for this function:

PostUpdate ( )

Definition at line 84 of file Class.Permission.php.

+ Here is the call graph for this function:

PreInsert ( )

Definition at line 90 of file Class.Permission.php.

+ Here is the call graph for this function:

Field Documentation

$actions = array()

Definition at line 57 of file Class.Permission.php.

$dbtable = "permission"

Definition at line 41 of file Class.Permission.php.

$fields
Initial value:
= array(
"id_user",
"id_application",
"id_acl",
"computed"
)

Definition at line 29 of file Class.Permission.php.

$id_fields
Initial value:
= array(
"id_user",
"id_application"
)

Definition at line 36 of file Class.Permission.php.

$privileges = array()

Definition at line 42 of file Class.Permission.php.

$sqlcreate
Initial value:
= '
create table permission (id_user int not null,
id_application int not null,
id_acl int not null,
computed boolean default false);
create index permission_idx1 on permission(id_user);
create index permission_idx2 on permission(id_application);
create index permission_idx3 on permission(id_acl);
create index permission_idx4 on permission(computed);
'

Definition at line 46 of file Class.Permission.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen - published under CC License - Dynacase