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

Check permission for API calls and search tasks #57

Open
jensschuppe opened this issue Feb 12, 2024 · 0 comments
Open

Check permission for API calls and search tasks #57

jensschuppe opened this issue Feb 12, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@jensschuppe
Copy link
Contributor

The permission access CiviOffice is only being used for hiding links and for checking route access. It should, however, also be checked for the CiviOffice.convert APIv3 call and for search tasks defined here:

function civioffice_civicrm_searchTasks($objectType, &$tasks)
{
switch ($objectType) {
case 'contact':
$tasks['civioffice'] = [
'title' => E::ts('Create Documents (CiviOffice)'),
'class' => 'CRM_Civioffice_Form_Task_CreateDocuments',
'result' => false,
];
break;
case 'contribution':
$tasks['civioffice'] = [
'title' => E::ts('Create Documents (CiviOffice)'),
'class' => 'CRM_Civioffice_Form_Task_CreateContributionDocuments',
'result' => false,
];
break;
case 'event':
$tasks['civioffice'] = [
'title' => E::ts('Create Documents (CiviOffice)'),
'class' => 'CRM_Civioffice_Form_Task_CreateParticipantDocuments',
'result' => false,
];
break;
case 'membership':
$tasks['civioffice'] = [
'title' => E::ts('Create Documents (CiviOffice)'),
'class' => 'CRM_Civioffice_Form_Task_CreateMembershipDocuments',
'result' => false,
];
break;
case 'activity':
$tasks['civioffice'] = [
'title' => E::ts('Create Documents (CiviOffice)'),
'class' => 'CRM_Civioffice_Form_Task_CreateActivityDocuments',
'result' => false,
];
break;
case 'case':
$tasks['civioffice'] = [
'title' => E::ts('Create Documents (CiviOffice)'),
'class' => 'CRM_Civioffice_Form_Task_CreateCaseDocuments',
'result' => false,
];
}
}

@jensschuppe jensschuppe added the enhancement New feature or request label Feb 12, 2024
@jensschuppe jensschuppe added this to the 1.0 milestone Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant