Last active
August 29, 2015 14:13
-
-
Save matglas/90cd9e32596929fdad3f to your computer and use it in GitHub Desktop.
Template for drupal permissions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_permission(). | |
*/ | |
function ZZMODULE_permission() { | |
$perms = array(); | |
// Allow access to certain pages based on this permissions | |
$perms['administer XX'] = array( | |
'title' => t('Administer [ZZMODULE] settings'), | |
'description' => t('Administer the settings of [ZZMODULE].') | |
'restrict access' => FALSE | |
); | |
// Allow access to certain items for create, edit, delete. | |
$perms['administer XX [items]'] = array( | |
'title' => t('Administer [ZZMODULE] [items]'), | |
'description' => t('Administer [items] of [ZZMODULE].') | |
'restrict access' => FALSE | |
); | |
return $perms; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment