[ Index ]

Source Code Reference for V1.00

title

Body

[close]

/classes/ -> permissions.class.php (summary)

Copyright 2005, the web2Project Team. This file is part of web2Project and is released under the same license. Check the file index.php in the top level web2project directory for license details.  If you cannot find this file, or a LICENSE or COPYING file, please email the author for details.

File Size: 1506 lines (47 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 2 files
 lib/phpgacl/gacl.class.php
 lib/phpgacl/gacl_api.class.php

Defines 1 class

w2Pacl:: (59 methods):
  w2Pacl()
  checkLogin()
  checkModule()
  checkModuleItem()
  checkModuleItemDenied()
  addLogin()
  updateLogin()
  deleteLogin()
  addModule()
  addModuleSection()
  addModuleItem()
  addGroupItem()
  deleteModule()
  deleteModuleSection()
  deleteModuleItems()
  deleteGroupItem()
  isUserPermitted()
  getPermittedUsers()
  getItemACLs()
  getUserACLs()
  getRoleACLs()
  getRole()
  getDeniedItems()
  getAllowedItems()
  getChildren()
  insertRole()
  updateRole()
  deleteRole()
  insertUserRole()
  deleteUserRole()
  getUserRoles()
  getRoleUsers()
  getUsersWithRole()
  getModuleList()
  getAssignableModules()
  getPermissionList()
  get_group_map()
  get_object_full()
  get_objects_full()
  get_object_sections()
  addUserPermission()
  addRolePermission()
  debug_text()
  msg()
  removeACLPermissions()
  removeModulePermissions()
  removePermissions()
  recalcPermissions()
  w2Pacl_check()
  w2Pacl_nuclear()
  w2Pacl_query()
  w2Psearch_acl()
  getReadableModule()
  checkFlag()
  isAllowed()
  getPermission()
  getDenyRead()
  getDenyEdit()
  getDenyAdd()


Class: w2Pacl  - X-Ref

Extend the gacl_api class.  There is an argument to separate this
into a gacl and gacl_api class on the premise that normal activity
only needs the functions in gacl, but it would appear that this is
not so for w2P, which tends to require reverse lookups rather than
just forward ones (i.e. looking up who is allowed to do x, rather
than is x allowed to do y).

w2Pacl($opts = null)   X-Ref
No description

checkLogin($login)   X-Ref
No description

checkModule($module, $op, $userid = null)   X-Ref
No description

checkModuleItem($module, $op, $item = null, $userid = null)   X-Ref
No description

checkModuleItemDenied($module, $op, $item, $user_id = null)   X-Ref
This gets tricky and is there mainly for the compatibility layer
for getDeny functions.
If we get an ACL ID, and we get access = false, then the item is
actively denied.  Any other combination is a soft-deny (i.e. not
strictly allowed, but not actively denied.


addLogin($login, $username)   X-Ref
No description

updateLogin($login, $username)   X-Ref
No description

deleteLogin($login)   X-Ref
No description

addModule($mod, $modname)   X-Ref
No description

addModuleSection($mod)   X-Ref
No description

addModuleItem($mod, $itemid, $itemdesc)   X-Ref
No description

addGroupItem($item, $group = 'all', $section = 'app', $type = 'axo')   X-Ref
No description

deleteModule($mod)   X-Ref
No description

deleteModuleSection($mod)   X-Ref
No description

deleteModuleItems($mod)   X-Ref
No description

deleteGroupItem($item, $group = 'all', $section = 'app', $type = 'axo')   X-Ref
No description

isUserPermitted($userid, $module = null)   X-Ref
No description

getPermittedUsers($module = null)   X-Ref
No description

getItemACLs($module, $uid = null)   X-Ref
No description

getUserACLs($uid = null)   X-Ref
No description

getRoleACLs($role_id)   X-Ref
No description

getRole($role_id)   X-Ref
No description

getDeniedItems($module, $uid = null)   X-Ref
No description

getAllowedItems($module, $uid = null)   X-Ref
No description

getChildren($group_id, $group_type = 'ARO', $recurse = 'NO_RECURSE')   X-Ref
No description

insertRole($value, $name)   X-Ref
No description

updateRole($id, $value, $name)   X-Ref
No description

deleteRole($id)   X-Ref
No description

insertUserRole($role, $user)   X-Ref
No description

deleteUserRole($role, $user)   X-Ref
No description

getUserRoles($user)   X-Ref
No description

getRoleUsers($role = null)   X-Ref
No description

getUsersWithRole()   X-Ref
No description

getModuleList()   X-Ref
No description

getAssignableModules()   X-Ref
No description

getPermissionList()   X-Ref
No description

get_group_map($id, $group_type = 'ARO')   X-Ref
No description

get_object_full($value = null, $section_value = null, $return_hidden = 1, $object_type = null)   X-Ref
No description

get_objects_full($section_value = null, $return_hidden = 1, $object_type = null, $limit_clause = null)   X-Ref
No description

get_object_sections($section_value = null, $return_hidden = 1, $object_type = null, $limit_clause = null)   X-Ref
No description

addUserPermission()   X-Ref
No description

addRolePermission()   X-Ref
No description

debug_text($text)   X-Ref
No description

msg()   X-Ref
No description

removeACLPermissions($acl_id = null)   X-Ref
w2Pacl::removeACLPermissions() Removes the permissions for a given ACL ID

param: mixed $module
return:

removeModulePermissions($module = null)   X-Ref
w2Pacl::removeModulePermissions() Removes the permissions from the results table for a module

param: mixed $module
return:

removePermissions($user_id = null)   X-Ref
w2Pacl::removePermissions() Removes the permissions from the results table for a given user (example: when you delete a user)

param: mixed $user_id
return:

recalcPermissions($user_id = null, $user_aro_id = null, $role_id = null, $module = '', $method = 1)   X-Ref
w2Pacl::recalcPermissions()

param: mixed $user_id
param: mixed $user_aro_id
param: mixed $role_id
param: mixed $module
return:

w2Pacl_check($application = 'application', $op, $user = 'user', $userid, $app = 'app', $module)   X-Ref
w2Pacl::w2Pacl_check()
//w2Pacl_check is used for modules only

param: mixed $application it passes 'application' string by default and is not used
param: mixed $op one of the acos 'access','view','add','delete','edit'
param: mixed $user it passes 'user' string by default and is not used
param: mixed $userid it passes the user_id
param: mixed $app it passes 'app' string by default and is not used
param: mixed $module it passes the modules name
return:

w2Pacl_nuclear($userid, $module, $item, $mod_class = array()   X-Ref
No description

w2Pacl_query($application = 'application', $op, $user = 'user', $userid, $module, $item)   X-Ref
w2Pacl::w2Pacl_query()
//w2Pacl_query is used for items only

param: string $application
param: mixed $op
param: string $user
param: mixed $userid
param: mixed $module
param: mixed $item
return:

w2Psearch_acl($application = 'application', $op, $user = 'user', $userid, $module)   X-Ref
No description

getReadableModule()   X-Ref
No description

checkFlag($flag, $perm_type, $old_flag)   X-Ref
This function is used to check permissions.


isAllowed($perm_type, $mod, $item_id = 0)   X-Ref
This function checks certain permissions for
a given module and optionally an item_id.

$perm_type can be PERM_READ or PERM_EDIT

getPermission($mod, $perm, $item_id = 0)   X-Ref
No description

getDenyRead($mod, $item_id = 0)   X-Ref
No description

getDenyEdit($mod, $item_id = 0)   X-Ref
No description

getDenyAdd($mod, $item_id = 0)   X-Ref
No description



Generated: Thu Nov 20 03:00:14 2008 Cross-referenced by PHPXref 0.7