Added Authorization plugin

Added LDAPAuthorization plugin
This commit is contained in:
Craig Andrews
2009-11-18 14:19:43 -05:00
parent 1d6bacc681
commit d07df8a796
8 changed files with 371 additions and 9 deletions

View File

@@ -594,9 +594,14 @@ class Profile extends Memcached_DataObject
function hasRole($name)
{
$role = Profile_role::pkeyGet(array('profile_id' => $this->id,
'role' => $name));
return (!empty($role));
$has_role = false;
if (Event::handle('StartHasRole', array($this, $name, &$has_role))) {
$role = Profile_role::pkeyGet(array('profile_id' => $this->id,
'role' => $name));
$has_role = !empty($role);
Event::handle('EndHasRole', array($this, $name, $has_role));
}
return $has_role;
}
function grantRole($name)