diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-16 00:30:05 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-16 00:30:05 +0000 |
commit | 3d2fc86604cca5df2d9578564f653528063ba24d (patch) | |
tree | 2dcbf4be3fdd7bfbe885beaecc1fdb0943dfd9ba /core/helpers | |
parent | 92e6ed8a8a9baad24318299edbaa0da1236089ce (diff) |
Permission only function on albums.
Diffstat (limited to 'core/helpers')
-rw-r--r-- | core/helpers/access.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/helpers/access.php b/core/helpers/access.php index badd9b0a..939f4238 100644 --- a/core/helpers/access.php +++ b/core/helpers/access.php @@ -130,6 +130,12 @@ class access_Core { * @return boolean */ private static function _set($group, $perm_name, $item, $value) { + if (!$item->loaded) { + throw new Exception("@todo INVALID_ITEM $item->id"); + } + if ($item->type != "album") { + throw new Exception("@todo INVALID_ITEM_TYPE not an album"); + } $access = ORM::factory("access_intent")->where("item_id", $item->id)->find(); if (!$access->loaded) { throw new Exception("@todo MISSING_ACCESS for $item->id"); |