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

Rubén A. Estrada Orozco rulotec1 at gmail.com
Sat May 28 15:17:36 GMT 2022


Patrick, I think it would be better to create an issue in code.vtiger.com
and add your fix in the description. In my opinion, there is a better
chance to get it fixed there.

Saludos

Rubén


On Tue, May 24, 2022 at 6:11 PM Patrick Allen <alexander.allenz at gmail.com>
wrote:

> 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;
> }
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220528/2fc9b8d9/attachment.html>


More information about the vtigercrm-developers mailing list