Skip to content
Snippets Groups Projects
Unverified Commit 22da88c4 authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub
Browse files

Merge pull request #14109 from mattwire/refactor_inboundemailshared

REF Use shared function to check inbound email permissions
parents dfcc1e08 426fe3c7
Branches
Tags
No related merge requests found
......@@ -2414,7 +2414,7 @@ INNER JOIN civicrm_option_group grp ON (grp.id = option_group_id AND grp.name =
}
/**
* Checks if user has permissions to edit inbound e-mails, either bsic info
* Checks if user has permissions to edit inbound e-mails, either basic info
* or both basic information and content.
*
* @return bool
......
......@@ -181,9 +181,7 @@ class CRM_Activity_Selector_Activity extends CRM_Core_Selector_Base implements C
$url = 'civicrm/contact/view/activity';
$qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}";
if (CRM_Core_Permission::check('edit inbound email basic information')
|| CRM_Core_Permission::check('edit inbound email basic information and content')
) {
if (CRM_Activity_BAO_Activity::checkEditInboundEmailsPermissions()) {
$showDelete = $showUpdate = TRUE;
$qsUpdate = "atype={$activityTypeId}&action=update&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}";
}
......
......@@ -2750,9 +2750,7 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')';
//allow edit operation.
$allowEditNames = array('Open Case');
if (CRM_Core_Permission::check('edit inbound email basic information') ||
CRM_Core_Permission::check('edit inbound email basic information and content')
) {
if (CRM_Activity_BAO_Activity::checkEditInboundEmailsPermissions()) {
$allowEditNames[] = 'Inbound Email';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment