diff --git a/code/objects/LocationCategory.php b/code/objects/LocationCategory.php index 4bc3861..517d4cc 100644 --- a/code/objects/LocationCategory.php +++ b/code/objects/LocationCategory.php @@ -9,7 +9,6 @@ */ class LocationCategory extends DataObject { - /** * @var array */ @@ -35,6 +34,7 @@ class LocationCategory extends DataObject * @var string */ private static $singular_name = 'Category'; + /** * @var string */ @@ -45,4 +45,39 @@ class LocationCategory extends DataObject */ private static $default_sort = 'Name'; + /** + * @param null|Member $member + * @return bool + */ + public function canView($member = null) + { + return true; + } + + /** + * @param null|Member $member + * @return bool|int + */ + public function canEdit($member = null) + { + return Permission::check('Location_EDIT', 'any', $member); + } + + /** + * @param null|Member $member + * @return bool|int + */ + public function canDelete($member = null) + { + return Permission::check('Location_DELETE', 'any', $member); + } + + /** + * @param null|Member $member + * @return bool|int + */ + public function canCreate($member = null) + { + return Permission::check('Location_CREATE', 'any', $member); + } }