mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-04 02:39:08 -04:00
Permission only function on albums.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user