Class auth_admin

Description

ACP Permission/Auth class

Located in /includes/acp/auth.php (line 23)

auth
   |
   --auth_admin
Method Summary
 auth_admin auth_admin ()
 void acl_add_option ( $options)
 void acl_delete ( $mode, [ $ug_id = false], [ $forum_id = false], [ $permission_type = false])
 void acl_set ( $ug_type,  $forum_id,  $ug_id,  $auth, [ $role_id = 0], [ $clear_prefetch = true])
 void acl_set_role ( $role_id,  $auth)
 void assign_cat_array ( &$category_array,  $tpl_cat,  $tpl_mask,  $ug_id,  $forum_id, [ $show_trace = false],  $s_view)
 void build_permission_array ( &$permission_row,  &$content_array,  &$categories,  $key_sort_array)
 void display_mask ( $mode,  $permission_type,  &$hold_ary, [ $user_mode = 'user'], [ $local = false], [ $group_display = true])
 void display_role_mask ( &$hold_ary)
 void get_mask (set|view $mode, [mixed $user_id = false], [mixed $group_id = false], [mixed $forum_id = false], [string $auth_option = false], [local|global $scope = false], [ACL_NEVER|ACL_NO|ACL_YES $acl_fill = ACL_NEVER])
 void get_role_mask ( $role_id)
 void ghost_permissions ( $from_user_id,  $to_user_id)
Variables
Methods
Constructor auth_admin (line 28)

Init auth settings

auth_admin auth_admin ()
acl_add_option (line 688)

NOTE: this function is not in use atm

Add a new option to the list ... $options is a hash of form -> $options = array( 'local' => array('option1', 'option2', ...), 'global' => array('optionA', 'optionB', ...) );

void acl_add_option ( $options)
  • $options
acl_delete (line 974)

Remove local permission

void acl_delete ( $mode, [ $ug_id = false], [ $forum_id = false], [ $permission_type = false])
  • $mode
  • $ug_id
  • $forum_id
  • $permission_type
acl_set (line 778)

Set a user or group ACL record

void acl_set ( $ug_type,  $forum_id,  $ug_id,  $auth, [ $role_id = 0], [ $clear_prefetch = true])
  • $ug_type
  • $forum_id
  • $ug_id
  • $auth
  • $role_id
  • $clear_prefetch
acl_set_role (line 911)

Set a role-specific ACL record

void acl_set_role ( $role_id,  $auth)
  • $role_id
  • $auth
assign_cat_array (line 1082)

Assign category to template

used by display_mask()

void assign_cat_array ( &$category_array,  $tpl_cat,  $tpl_mask,  $ug_id,  $forum_id, [ $show_trace = false],  $s_view)
  • &$category_array
  • $tpl_cat
  • $tpl_mask
  • $ug_id
  • $forum_id
  • $show_trace
  • $s_view
build_permission_array (line 1158)

Building content array from permission rows with explicit key ordering

used by display_mask()

void build_permission_array ( &$permission_row,  &$content_array,  &$categories,  $key_sort_array)
  • &$permission_row
  • &$content_array
  • &$categories
  • $key_sort_array
display_mask (line 263)

Display permission mask (assign to template)

void display_mask ( $mode,  $permission_type,  &$hold_ary, [ $user_mode = 'user'], [ $local = false], [ $group_display = true])
  • $mode
  • $permission_type
  • &$hold_ary
  • $user_mode
  • $local
  • $group_display
display_role_mask (line 607)

Display permission mask for roles

void display_role_mask ( &$hold_ary)
  • &$hold_ary
get_mask (line 74)

Get permission mask This function only supports getting permissions of one type (for example a_)

void get_mask (set|view $mode, [mixed $user_id = false], [mixed $group_id = false], [mixed $forum_id = false], [string $auth_option = false], [local|global $scope = false], [ACL_NEVER|ACL_NO|ACL_YES $acl_fill = ACL_NEVER])
  • set|view $mode: defines the permissions we get, view gets effective permissions (checking user AND group permissions), set only gets the user or group permission set alone
  • mixed $user_id: user ids to search for (a user_id or a group_id has to be specified at least)
  • mixed $group_id: group ids to search for, return group related settings (a user_id or a group_id has to be specified at least)
  • mixed $forum_id: forum_ids to search for. Defining a forum id also means getting local settings
  • string $auth_option: the auth_option defines the permission setting to look for (a_ for example)
  • local|global $scope: the scope defines the permission scope. If local, a forum_id is additionally required
  • ACL_NEVER|ACL_NO|ACL_YES $acl_fill: defines the mode those permissions not set are getting filled with
get_role_mask (line 225)

Get permission mask for roles

This function only supports getting masks for one role

void get_role_mask ( $role_id)
  • $role_id
ghost_permissions (line 1223)

Use permissions from another user. This transferes a permission set from one user to another.

The other user is always able to revert back to his permission set. This function does not check for lower/higher permissions, it is possible for the user to gain "more" permissions by this. Admin permissions will not be copied.

void ghost_permissions ( $from_user_id,  $to_user_id)
  • $from_user_id
  • $to_user_id

Inherited Methods

Inherited From auth

 auth::acl()
 auth::acl_cache()
 auth::acl_clear_prefetch()
 auth::acl_get()
 auth::acl_getf()
 auth::acl_getf_global()
 auth::acl_gets()
 auth::acl_get_list()
 auth::acl_group_raw_data()
 auth::acl_raw_data()
 auth::acl_raw_data_single_user()
 auth::acl_role_data()
 auth::acl_user_raw_data()
 auth::build_auth_option_statement()
 auth::build_bitstring()
 auth::login()
 auth::_set_group_hold_ary()

Documentation generated on Tue, 26 Aug 2008 08:33:58 +0200 by phpDocumentor 1.4.2