Skip to content

Instantly share code, notes, and snippets.

@hailwood
Created January 18, 2015 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hailwood/37c0e24bb4a6bc8bfa33 to your computer and use it in GitHub Desktop.
Save hailwood/37c0e24bb4a6bc8bfa33 to your computer and use it in GitHub Desktop.
<?php
//...
public function canView($member = null) {
return Permission::check(array('CMS_ACCESS_CMSMain','RESTfulAPI_VIEW'), 'any', $member);
}
public function canEdit($member = null) {
return Permission::check(array('CMS_ACCESS_CMSMain','RESTfulAPI_EDIT'), 'any', $member);
}
public function canDelete($member = null) {
return Permission::check(array('CMS_ACCESS_CMSMain','RESTfulAPI_DELETE'), 'any', $member);
}
public function canCreate($member = null) {
return Permission::check(array('CMS_ACCESS_CMSMain','RESTfulAPI_CREATE'), 'any', $member);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment