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

Class: LiveUser_Perm_Complex

Source Location: /LiveUser-0.16.14/LiveUser/Perm/Complex.php

Class Overview

LiveUser_Perm_Simple
   |
   --LiveUser_Perm_Medium
      |
      --LiveUser_Perm_Complex

Complex container for permission handling


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 Markus Wolff

Methods


Inherited Variables

Inherited Methods

Class: LiveUser_Perm_Simple

LiveUser_Perm_Simple::LiveUser_Perm_Simple()
Class constructor. Feel free to override in backend subclasses.
LiveUser_Perm_Simple::checkRight()
Checks if the current user has a certain right.
LiveUser_Perm_Simple::disconnect()
Properly disconnect from resources.
LiveUser_Perm_Simple::freeze()
Stores all properties in an array.
LiveUser_Perm_Simple::getProperty()
Function returns the inquired value if it exists in the class.
LiveUser_Perm_Simple::init()
Load and initialize the storage container.
LiveUser_Perm_Simple::mapUser()
Tries to find the user with the given user ID in the permissions container. Will read all permission data and return true on success.
LiveUser_Perm_Simple::unfreeze()
Reinitializes properties from the storage container.

Class Details

[line 67]
Complex container for permission handling

Complex permission complexity driver for LiveUser.



[ Top ]


Method Detail

checkLevel   [line 242]

bool checkLevel( int $level, int|array $owner_user_id, int|array $owner_group_id)

Checks if the current user has a certain right in a given area at the necessary level.

Level 1: requires that owner_user_id matches $this->perm_user_id Level 2: requires that the $owner_group_id matches the id one of the (sub)groups that $this->perm_user_id is a member of or requires that the $owner_user_id matches a perm_user_id of a member of one of $this->perm_user_id's (sub)groups Level 3: no requirements

Important note: Every ressource MAY be owned by a user and/or by a group. Therefore, $owner_user_id and/or $owner_group_id can either be an integer or null.

  • Return: level if the level is sufficient to grant access else false.
  • See: checkRightLevel()
  • Access: public

Parameters:

int   $level     Level value as returned by checkRight().
int|array   $owner_user_id     Id or array of Ids of the owner of the
int|array   $owner_group_id     Id or array of Ids of the group of the ressource for which the right is requested.

[ Top ]


Documentation generated on Fri, 15 Oct 2010 15:00:05 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.