Skip to content
Snippets Groups Projects
Commit 88716121 authored by Prasad's avatar Prasad
Browse files

Allow account owner of CRM to create user.

parent 675bee77
No related branches found
No related tags found
No related merge requests found
......@@ -21,10 +21,10 @@ class Users_Save_Action extends Vtiger_Save_Action {
if ($allowed) {
// Deny access if not administrator or account-owner or self
if(!$currentUserModel->isAdminUser()) {
if(!$currentUserModel->isAdminUser() && !$recordModel->isAccountOwner()) {
if (empty($record)) {
$allowed = false;
} else if (!$recordModel->isAccountOwner() || ($currentUserModel->get('id') != $recordModel->getId())) {
} else if ($currentUserModel->get('id') != $recordModel->getId()) {
$allowed = false;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment