id == identity::active_user()->id && user_chroot::album() ) { if( $item->left_ptr < user_chroot::album()->left_ptr || user_chroot::album()->right_ptr < $item->right_ptr ) { return false; } } return parent::user_can($user, $perm_name, $item); } /** * Copied from modules/gallery/helpers/access.php because of the usage of self:: */ static function can($perm_name, $item) { return self::user_can(identity::active_user(), $perm_name, $item); } /** * Copied from modules/gallery/helpers/access.php because of the usage of self:: */ static function required($perm_name, $item) { if (!self::can($perm_name, $item)) { if ($perm_name == "view") { // Treat as if the item didn't exist, don't leak any information. throw new Kohana_404_Exception(); } else { self::forbidden(); } } } }