summaryrefslogtreecommitdiff
path: root/core/helpers/access.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/helpers/access.php')
-rw-r--r--core/helpers/access.php6
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");