Skip to content

Commit

Permalink
add missing cms: prefix to permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
ufundo committed Apr 12, 2024
1 parent 0b849b7 commit 77f883e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CRM/Profile/Form.php
Expand Up @@ -808,7 +808,7 @@ public function buildQuickForm(): void {
// if we are a admin OR the same user OR acl-user with access to the profile
// or we have checksum access to this contact (i.e. the user without a login) - CRM-5909
if (
CRM_Core_Permission::check('administer users') ||
CRM_Core_Permission::check('cms:administer users') ||
$this->_id == $this->_currentUserID ||
$this->_isPermissionedChecksum ||
in_array(
Expand Down
2 changes: 1 addition & 1 deletion CRM/Profile/Page/Dynamic.php
Expand Up @@ -201,7 +201,7 @@ public function run() {

$this->_isPermissionedChecksum = $allowPermission = FALSE;
$permissionType = CRM_Core_Permission::VIEW;
if (CRM_Core_Permission::check('administer users') || CRM_Core_Permission::check('view all contacts') || CRM_Contact_BAO_Contact_Permission::allow($this->_id)) {
if (CRM_Core_Permission::check('cms:administer users') || CRM_Core_Permission::check('view all contacts') || CRM_Contact_BAO_Contact_Permission::allow($this->_id)) {
$allowPermission = TRUE;
}
if ($this->_id != $userID) {
Expand Down

0 comments on commit 77f883e

Please sign in to comment.