diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-22 13:09:20 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-22 13:11:03 -0700 |
commit | 3c936d661a088fb43b47eb5b208958180e8f65eb (patch) | |
tree | 1a117dc1bfe54bec44f664cbd7c5f8c93aa5e993 /modules/gallery/controllers/permissions.php | |
parent | 4cb9ec1d6d37b49ebafc68d0a94d794a1acb8b28 (diff) |
Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class
Diffstat (limited to 'modules/gallery/controllers/permissions.php')
-rw-r--r-- | modules/gallery/controllers/permissions.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gallery/controllers/permissions.php b/modules/gallery/controllers/permissions.php index 58c5b816..99943fbb 100644 --- a/modules/gallery/controllers/permissions.php +++ b/modules/gallery/controllers/permissions.php @@ -51,7 +51,7 @@ class Permissions_Controller extends Controller { function change($command, $group_id, $perm_id, $item_id) { access::verify_csrf(); - $group = Identity::lookup_group($group_id); + $group = identity::lookup_group($group_id); $perm = ORM::factory("permission", $perm_id); $item = ORM::factory("item", $item_id); access::required("view", $item); @@ -74,7 +74,7 @@ class Permissions_Controller extends Controller { // If the active user just took away their own edit permissions, give it back. if ($perm->name == "edit") { - if (!access::user_can(Session::active_user(), "edit", $item)) { + if (!access::user_can(identity::active_user(), "edit", $item)) { access::allow($group, $perm->name, $item); } } @@ -84,7 +84,7 @@ class Permissions_Controller extends Controller { private function _get_form($item) { $view = new View("permissions_form.html"); $view->item = $item; - $view->groups = Identity::groups(); + $view->groups = identity::groups(); $view->permissions = ORM::factory("permission")->find_all(); return $view; } |