[Vtigercrm-developers] Vtiger 7.* sharing access rules not working after create a new user
Patrick Allen
alexander.allenz at gmail.com
Sat May 28 18:19:25 GMT 2022
If there are some sharing access rules, as example, private records for one
role and in custom rules you add the function to view and/or edit records
for another roles it doesnt work if a new user is created.
For this purpose i add this code to /modules/Users/Users.php in function
save
$result = $this->db->pquery('SELECT id FROM vtiger_users WHERE deleted =
?', array(0));
$numOfRows = $this->db->num_rows($result);
for($i=0; $i<$numOfRows; $i++) {
require_once('modules/Users/CreateUserPrivilegeFile.php');
createUserSharingPrivilegesfile($this->db->query_result($result, $i, 'id'));
}
If someone has this issue this will works. Also, If someone can put it on
code.vtiger.com will useful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220528/5b7048bc/attachment.html>
More information about the vtigercrm-developers
mailing list