Permission only function on albums.

This commit is contained in:
Bharat Mediratta
2008-12-16 00:30:05 +00:00
parent 92e6ed8a8a
commit 3d2fc86604
2 changed files with 36 additions and 38 deletions

View File

@@ -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");