function invite_permission in Invite 7.4
Same name and namespace in other branches
- 7.2 invite.module \invite_permission()
Implements hook_permission().
File
- ./
invite.module, line 466
Code
function invite_permission() {
$permissions = array(
'administer invitations' => array(
'title' => t('Administer invitations'),
'description' => t('Administer all invitations'),
'restrict access' => TRUE,
),
'administer invite types' => array(
'title' => t('Administer invite types'),
'description' => t('Allows users to configure invite types and their fields.'),
'restrict access' => TRUE,
),
'create any invite entities' => array(
'title' => t('Create any invites'),
'description' => t('Allows users to create invites of any type.'),
'restrict access' => FALSE,
),
'view any invite entities' => array(
'title' => t('View any invites'),
'description' => t('Allows users to view invites.'),
'restrict access' => TRUE,
),
'edit any invite entities' => array(
'title' => t('Edit any invites'),
'description' => t('Allows users to edit any invites.'),
'restrict access' => TRUE,
),
'edit own invite entities' => array(
'title' => t('Edit own invites'),
'description' => t('Allows users to edit own invites.'),
'restrict access' => FALSE,
),
'withdraw own invitations' => array(
'title' => t('Withdraw own invitations'),
'description' => t('Allows users to withdraw own invitations.'),
'restrict access' => FALSE,
),
'withdraw own accepted invitations' => array(
'title' => t('Withdraw own accepted invitations'),
'description' => t('Allows users to edit own invites.'),
'restrict access' => FALSE,
),
'resend own invitations' => array(
'title' => t('Resend own invitations'),
'description' => t('Allows users to resend their invitations that have expired. Add the "resend unexpired invitations" permission to allow them to resend their invitations that have not expired yet.'),
'restrict access' => FALSE,
),
'resend any invitations' => array(
'title' => t('Resend any invitations'),
'description' => t('Allows users to resend any invitation that have expired. Add the "resend unexpired invitations" permission to allow them to resend the invitations that have not expired yet.'),
'restrict access' => FALSE,
),
'resend unexpired invitations' => array(
'title' => t('Resend unexpired invitations'),
'description' => t('Allows users to resend invitations that have not expired yet. This needs to be used in relation with the "resend own invitations" or "resend any invitations" permission.'),
'restrict access' => FALSE,
),
);
foreach (invite_get_types() as $invite_type) {
$permissions['create ' . $invite_type->type . ' entity'] = array(
'title' => t('%name create new invites.', array(
'%name' => $invite_type->label,
)),
'description' => '',
'restrict access' => FALSE,
);
}
return $permissions;
}