Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define permissions using the correct format (label and description) #74

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 24 additions & 6 deletions remoteevent.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,30 @@ function remoteevent_civicrm_entityTypes(&$entityTypes)
*/
function remoteevent_civicrm_permission(&$permissions)
{
$permissions['view public Remote Events'] = E::ts('RemoteEvent: list public events');
$permissions['view all Remote Events'] = E::ts('RemoteEvent: list all events');
$permissions['spawn Remote Events'] = E::ts('RemoteEvent: spawn (create) events');
$permissions['register to Remote Events'] = E::ts('RemoteEventRegistration: register');
$permissions['edit Remote Event registrations'] = E::ts('RemoteEventRegistration: edit');
$permissions['cancel Remote Events registrations'] = E::ts('RemoteEventRegistration: cancel');
$permissions['view public Remote Events'] = [
'label' => E::ts('CiviRemote Event: List public events'),
'description' => E::ts('Allows listing remote events marked as public via the CiviRemote Event API.'),
];
$permissions['view all Remote Events'] = [
'label' => E::ts('CiviRemote Event: List all events'),
'description' => E::ts('Allows listing all remote events via the CiviRemote Event API.'),
];
$permissions['spawn Remote Events'] = [
'label' => E::ts('CiviRemote Event: Spawn (create) events'),
'description' => E::ts('Allows creating remote events via the CiviRemote Event API for further editing.'),
];
$permissions['register to Remote Events'] = [
'label' => E::ts('CiviRemote Event: Register'),
'description' => E::ts('Allows registering for remote events via the CiviRemote Event API.'),
];
$permissions['edit Remote Event registrations'] = [
'label' => E::ts('CiviRemote Event: Edit registration'),
'description' => E::ts('Allows updating registrations for remote events via the CiviRemote Event API.'),
];
$permissions['cancel Remote Events registrations'] = [
'label' => E::ts('CiviRemote Event: Cancel registration'),
'description' => E::ts('Allows cancelling registrations for remote events via the CiviRemote Event API.'),
];
}

/**
Expand Down