From 00eacd659f27df9c13246c510057c4f42c8866a2 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 15 Oct 2009 14:37:57 -0700 Subject: Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module. --- modules/digibug/controllers/digibug.php | 2 +- modules/digibug/tests/Digibug_Controller_Test.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/digibug') diff --git a/modules/digibug/controllers/digibug.php b/modules/digibug/controllers/digibug.php index 0939704b..8ea83601 100644 --- a/modules/digibug/controllers/digibug.php +++ b/modules/digibug/controllers/digibug.php @@ -23,7 +23,7 @@ class Digibug_Controller extends Controller { $item = ORM::factory("item", $id); access::required("view", $item); - if (access::group_can(group::everybody(), "view_full", $item)) { + if (access::group_can(Identity::everybody(), "view_full", $item)) { $full_url = $item->file_url(true); $thumb_url = $item->thumb_url(true); } else { diff --git a/modules/digibug/tests/Digibug_Controller_Test.php b/modules/digibug/tests/Digibug_Controller_Test.php index 859ff637..19f57972 100644 --- a/modules/digibug/tests/Digibug_Controller_Test.php +++ b/modules/digibug/tests/Digibug_Controller_Test.php @@ -35,8 +35,8 @@ class Digibug_Controller_Test extends Unit_Test_Case { $root = ORM::factory("item", 1); $this->_album = album::create($root, rand(), "test album"); - access::deny(group::everybody(), "view_full", $this->_album); - access::deny(group::registered_users(), "view_full", $this->_album); + access::deny(Identity::everybody(), "view_full", $this->_album); + access::deny(Identity::registered_users(), "view_full", $this->_album); $rand = rand(); $this->_item = photo::create($this->_album, MODPATH . "gallery/tests/test.jpg", "$rand.jpg", -- cgit v1.2.3