Core  3.2
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 ($id)
 
 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, $strict=false)
 
 substituteHasPrivilege ($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, $reset=true)
 
 affect ($array, $more=false, $reset=true)
 
 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 ()
 
 setError ($moreerr= '')
 
 autoUpdate ()
 
 savePoint ($point)
 
 lockPoint ($exclusiveLock, $exclusiveLockPrefix= '')
 
 setMasterLock ($useLock)
 
 rollbackPoint ($point)
 
 commitPoint ($point)
 

Data Fields

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

Additional Inherited Members

- Static Public Attributes inherited from DbObj
static $savepoint = array()
 
static $lockpoint = array()
 
static $sqlStrict = null
 
- Protected Member Functions inherited from DbObj
 tryCreate ()
 

Detailed Description

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

Constructor & Destructor Documentation

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

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

+ Here is the call graph for this function:

Member Function Documentation

AddUserPermission (   $appname,
  $aclname 
)

Definition at line 426 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 314 of file Class.Permission.php.

DelAppPerm (   $id)

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

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

delete permissions

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

+ Here is the call graph for this function:

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

Definition at line 173 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 447 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 268 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 287 of file Class.Permission.php.

+ Here is the call graph for this function:

GetGPrivileges ( )

return ACL un list for a user

Definition at line 258 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 324 of file Class.Permission.php.

+ Here is the call graph for this function:

GetUnPrivileges ( )

return ACL un list for a user

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

+ Here is the call graph for this function:

GetUpPrivileges ( )

return ACL up list for a user

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

+ Here is the call graph for this function:

GrantLevel (   $user,
  $application 
)

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

hasPrivilege (   $idacl,
  $strict = false 
)

return true if user has this privilege

Parameters
string$idaclacl id
bool$strictset to true to not use substitute user account property
Returns
bool

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

+ Here is the call graph for this function:

IsOver (   $user,
  $application,
  $acl 
)

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

ListApplicationUsers (   $app)

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

ListUserApplications (   $user)

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

ListUserPermissions (   $user,
  $app 
)

Gives the list of Permission for a user on an application

Parameters
Account$user
Application$app
Returns
array

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

PostDelete ( )

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

+ Here is the call graph for this function:

postInsert ( )

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

+ Here is the call graph for this function:

postSelect (   $id)

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

+ Here is the call graph for this function:

PostUpdate ( )

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

+ Here is the call graph for this function:

PreInsert ( )

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

+ Here is the call graph for this function:

substituteHasPrivilege (   $idacl)

return true if incumbent user has this privilege

Parameters
string$idaclacl id
Returns
bool

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

Field Documentation

$actions = array()

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

$computed

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

$dbtable = "permission"

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

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

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

$id_acl

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

$id_application

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

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

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

$id_user

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

$privileges = array()

Definition at line 40 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 44 of file Class.Permission.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen