[Vtigercrm-developers] Can asign records to ... bug in VT7.3

Patrick Allen alexander.allenz at gmail.com
Tue May 24 23:07:23 GMT 2022


I found that in role configuration if I choose that a role can assign
records to user having the same role or subordinates it doesnt works as
expected.

With this option, the user can assign records to every user in different
roles but in the same Level and subordinated of each role.

This happened because this configuration calls the function
getSameLevelUsersWithSubordinates(). I modify this function with the next
code to works well. I dont know why vtiger put this configuration and also
I dont know how to request a merge or something.  I show here the
modifications if someone need it.


public function getSameLevelUsersWithSubordinates(){
   $currentUserRoleModel =
Settings_Roles_Record_Model::getInstanceById($this->getRole());
   $sameLevelRoles = $currentUserRoleModel->getSameRoles();
//$sameLevelRoles = $currentUserRoleModel->getSameLevelRoles();

   $sameLevelUsers = $this->getAllUsersOnRoles($sameLevelRoles);
   $subordinateUsers = $this->getRoleBasedSubordinateUsers();
   foreach ($subordinateUsers as $userId => $userName) {
     $sameLevelUsers[$userId] = $userName;
   }
   return $sameLevelUsers;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220524/6a5522a9/attachment-0001.html>


More information about the vtigercrm-developers mailing list