function registration_permission_list in Entity Registration 7
Same name and namespace in other branches
- 8.2 registration.module \registration_permission_list()
- 8 registration.module \registration_permission_list()
- 7.2 registration.module \registration_permission_list()
Builds permissions for a registration type.
Parameters
object $info: Information about a registration type.
Return value
array An array of permission names and descriptions keyed by permission name.
1 call to registration_permission_list()
- registration_permission in ./
registration.module - Implements hook_permission().
File
- ./
registration.module, line 418
Code
function registration_permission_list($info) {
$type = $info->name;
$label = $info->label;
return array(
"administer {$type} registration" => array(
'title' => t('%type_name: Administer settings', array(
'%type_name' => $label,
)),
'description' => t('Allow changing registration settings for all entities of this type.'),
),
"administer own {$type} registration" => array(
'title' => t('%type_name: Administer own settings', array(
'%type_name' => $label,
)),
'description' => t('Allow changing registration settings for entities which a user has edit access.'),
),
"view {$type} registration" => array(
'title' => t('%type_name: View all registrations', array(
'%type_name' => $label,
)),
),
"view own {$type} registration" => array(
'title' => t('%type_name: View own registrations', array(
'%type_name' => $label,
)),
),
"create {$type} registration" => array(
'title' => t('%type_name: Create new registration', array(
'%type_name' => $label,
)),
),
"update own {$type} registration" => array(
'title' => t('%type_name: Edit own registrations', array(
'%type_name' => $label,
)),
),
"update any {$type} registration" => array(
'title' => t('%type_name: Edit any registrations', array(
'%type_name' => $label,
)),
),
"delete own {$type} registration" => array(
'title' => t('%type_name: Delete own registrations', array(
'%type_name' => $label,
)),
),
"delete any {$type} registration" => array(
'title' => t('%type_name: Delete any registrations', array(
'%type_name' => $label,
)),
),
"create {$type} registration self" => array(
'title' => t('%type_name: Register self', array(
'%type_name' => $label,
)),
),
"create {$type} registration other users" => array(
'title' => t('%type_name: Register other accounts', array(
'%type_name' => $label,
)),
'description' => t("Register other users by username. Note that giving this permission to Anonymous is not recommended, as it can expose a user's registration status to a site visitor who knows their username."),
),
"create {$type} registration other anonymous" => array(
'title' => t('%type_name: Register other people', array(
'%type_name' => $label,
)),
),
"edit {$type} registration state" => array(
'title' => t('%type_name: Edit registration state', array(
'%type_name' => $label,
)),
),
);
}