LiveUser_Admin
[ class tree: LiveUser_Admin ] [ index: LiveUser_Admin ] [ all elements ]

Class: LiveUser_Admin_Perm_Complex

Source Location: /LiveUser_Admin-0.3.3/Perm/Complex.php

Class Overview

LiveUser_Admin_Perm_Simple
   |
   --LiveUser_Admin_Perm_Medium
      |
      --LiveUser_Admin_Perm_Complex

Complex permission administration class


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2005 Markus Wolff

Methods


Inherited Variables

Inherited Methods

Class: LiveUser_Admin_Perm_Medium

LiveUser_Admin_Perm_Medium::LiveUser_Admin_Perm_Medium()
Constructor
LiveUser_Admin_Perm_Medium::addGroup()
Adds a group
LiveUser_Admin_Perm_Medium::addUserToGroup()
Adds a user to a group
LiveUser_Admin_Perm_Medium::getGroups()
Fetches group(s)
LiveUser_Admin_Perm_Medium::grantGroupRight()
Grants a group X rights
LiveUser_Admin_Perm_Medium::removeGroup()
Removes group(s)
LiveUser_Admin_Perm_Medium::removeRight()
Removes right(s)
LiveUser_Admin_Perm_Medium::removeUser()
Removes user(s)
LiveUser_Admin_Perm_Medium::removeUserFromGroup()
Removes user(s) from group(s)
LiveUser_Admin_Perm_Medium::revokeGroupRight()
Revokes (removes) right(s) from group(s)
LiveUser_Admin_Perm_Medium::updateGroup()
Update group(s)
LiveUser_Admin_Perm_Medium::updateGroupRight()
Updates group(s) right(s)

Class: LiveUser_Admin_Perm_Simple

LiveUser_Admin_Perm_Simple::LiveUser_Admin_Perm_Simple()
Class constructor. Feel free to override in backend subclasses.
LiveUser_Admin_Perm_Simple::addApplication()
Add application
LiveUser_Admin_Perm_Simple::addArea()
Add area
LiveUser_Admin_Perm_Simple::addRight()
Add right
LiveUser_Admin_Perm_Simple::addTranslation()
Add translation
LiveUser_Admin_Perm_Simple::addUser()
Add user
LiveUser_Admin_Perm_Simple::disconnect()
properly disconnect from resources
LiveUser_Admin_Perm_Simple::getApplications()
Fetches applications
LiveUser_Admin_Perm_Simple::getAreas()
Fetches areas
LiveUser_Admin_Perm_Simple::getCurrentApplication()
Get current application
LiveUser_Admin_Perm_Simple::getRights()
Fetches rights
LiveUser_Admin_Perm_Simple::getTranslations()
Fetches translations
LiveUser_Admin_Perm_Simple::getUsers()
Fetches users
LiveUser_Admin_Perm_Simple::grantUserRight()
Grant user a right
LiveUser_Admin_Perm_Simple::init()
Load the storage container
LiveUser_Admin_Perm_Simple::outputRightsConstants()
Generate the constants to a file or define them directly.
LiveUser_Admin_Perm_Simple::removeApplication()
Remove application(s)
LiveUser_Admin_Perm_Simple::removeArea()
Removes all areas define in the filter as well as any rights assigned to that area.
LiveUser_Admin_Perm_Simple::removeRight()
Remove right
LiveUser_Admin_Perm_Simple::removeTranslation()
Remove translation(s)
LiveUser_Admin_Perm_Simple::removeUser()
Remove user
LiveUser_Admin_Perm_Simple::revokeUserRight()
Revoke (remove) right(s) from the user(s)
LiveUser_Admin_Perm_Simple::setCurrentApplication()
Set current application
LiveUser_Admin_Perm_Simple::updateApplication()
Update application(s)
LiveUser_Admin_Perm_Simple::updateArea()
Update area(s)
LiveUser_Admin_Perm_Simple::updateRight()
Update right
LiveUser_Admin_Perm_Simple::updateTranslation()
Update translation(s)
LiveUser_Admin_Perm_Simple::updateUser()
Update usr
LiveUser_Admin_Perm_Simple::updateUserRight()
Update right(s) for the given user(s)

Class Details

[line 87]
Complex permission administration class

This class provides a set of functions for implementing a user permission management system on live websites. All authorisation backends/containers must be extensions of this base class.



[ Top ]


Method Detail

LiveUser_Admin_Perm_Complex (Constructor)   [line 98]

void LiveUser_Admin_Perm_Complex( mixed 0)

Constructor
  • Access: protected

Parameters:

mixed   0   —  configuration array

[ Top ]

addAreaAdmin   [line 271]

void addAreaAdmin( array $data)

Add Area Admin
  • Access: public

Parameters:

array   $data   — 

[ Top ]

assignSubGroup   [line 121]

mixed assignSubGroup( array $data)

Assign subgroup to parent group.

First checks if groupId and subgroupId are the same then if the child group is already assigned to the parent group and last if the child group does have a parent group already assigned to it. (Just to difference between what kinda error was hit)

If so it returns false and pushes the error into stack

  • Return: false on error, blah on success
  • Access: public

Parameters:

array   $data   — 

[ Top ]

getGroups   [line 629]

boolean getGroups( [array $params = array()])

Get groups

Params: subgroups - defaults to false If subgroups should be included, if false then it acts same as the medium container getGroups, if set to true it will return all subgroups like they are directly assigned, if set to 'hierarchy' it will place a tree of the subgroups under the array key 'subgroups'

note that 'hierarchy' requires 'rekey' enabled, 'group' is disabled, 'select' set to 'all' and the first field needs to be 'group_id'

rekey = defaults to false By default (false) we return things in this fashion

  1.        array(0 => array('group_id' => '1'))
But if rekey is turned on you get
  1.        array(1 => array('group_define_name' => 'FOO'))
Where 1 is the group_id

  • Return: | array
  • Access: public

Overrides LiveUser_Admin_Perm_Medium::getGroups() (Fetches group(s))

Parameters:

array   $params   — 

[ Top ]

getParentGroup   [line 575]

array getParentGroup( int $subGroupId)

Get parent of the group that's passed via param
  • Access: public

Parameters:

int   $subGroupId   —  Id of the group that is used to fetch parents

[ Top ]

getRights   [line 778]

boolean getRights( [array $params = array()])

Fetches rights
  • Return: | array
  • Access: public

Overrides LiveUser_Admin_Perm_Simple::getRights() (Fetches rights)

Parameters:

array   $params   — 

[ Top ]

grantGroupRight   [line 519]

void grantGroupRight( array $data)

Grant Group Rights
  • Access: public
  • Uses: LiveUser_Admin_Perm_Medium::grantGroupRight

Overrides LiveUser_Admin_Perm_Medium::grantGroupRight() (Grants a group X rights)

Parameters:

array   $data   — 

[ Top ]

implyRight   [line 186]

void implyRight( array $data)

Imply Right
  • Access: public

Parameters:

array   $data   — 

[ Top ]

removeArea   [line 353]

void removeArea( array $filters)

Remove Area
  • Access: public

Overrides LiveUser_Admin_Perm_Simple::removeArea() (Removes all areas define in the filter as well as any rights assigned to that area.)

Parameters:

array   $filters   —  Array containing the filters on what area(s) should be removed

[ Top ]

removeAreaAdmin   [line 332]

mixed removeAreaAdmin( array $filters)

Remove Area Admin
  • Access: public

Parameters:

array   $filters   —  Array containing the filters on what area admin(s) should be removed

[ Top ]

removeGroup   [line 475]

void removeGroup( array $filters)

Removes groups, can remove subgroups recursively if option recursive is passed on as true.
  • Access: public
  • Uses: LiveUser_Admin_Perm_Medium::removeGroup

Overrides LiveUser_Admin_Perm_Medium::removeGroup() (Removes group(s))

Parameters:

array   $filters   —  Array containing the filters on what group(s) should be removed

[ Top ]

removeRight   [line 384]

void removeRight( array $filters)

Remove Right
  • Access: public
  • Uses: LiveUser_Admin_Perm_Medium::removeRight - LiveUser_Admin_Perm_Complex::_updateImpliedStatus LiveUser_Admin_Perm_Complex::unimplyRight

Overrides LiveUser_Admin_Perm_Medium::removeRight() (Removes right(s))

Parameters:

array   $filters   —  Array containing the filters on what right(s) should be removed

[ Top ]

removeUser   [line 414]

void removeUser( array $filters)

Remove User
  • Access: public
  • Uses: LiveUser_Admin_Perm_Medium::removeUser - LiveUser_Admin_Perm_Complex::updateGroup

Overrides LiveUser_Admin_Perm_Medium::removeUser() (Removes user(s))

Parameters:

array   $filters   —  Array containing the filters on what user(s) should be removed

[ Top ]

unassignSubGroup   [line 170]

void unassignSubGroup( array $filters)

Don't let the function name fool ya, it actually can remove more then one subgroup record at a time via the filters.

Most of the time you pass either group_id or subgroup_id or both with the filters to remove one or more record.

  • Access: public

Parameters:

array   $filters   — 

[ Top ]

unimplyRight   [line 242]

void unimplyRight( array $filters, [ $update = true])

Unimply Right
  • Access: public

Parameters:

array   $filters   — 
   $update   — 

[ Top ]

_updateImpliedStatus   [line 535]

void _updateImpliedStatus( array $filters)

Updates implied status
  • Access: public

Parameters:

array   $filters   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:16:43 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.