[Vtigercrm-developers] Problem on "Users having Same Role or Subordinate Role"
Vincenzo Bruno
v.bruno at vinsoft.it
Tue Jan 28 16:57:31 GMT 2025
My team investigated furter and it's a feature.....
The option "Users having Same Role or Subordinate Role" calls the function
*public function get_SameLevel_UsersWithSubordinates(){*
$currentUserRoleModel =
Settings_Roles_Record_Model::getInstanceById($this->getRole());
$sameLevelRoles = $currentUserRoleModel->*getSameLevelRoles()*;
$sameLevelUsers = $this->*getAllUsersOnRoles($sameLevelRoles)*;
$subordinateUsers = $this->getRoleBasedSubordinateUsers();
foreach ($subordinateUsers as $userId => $userName) {
$sameLevelUsers[$userId] = $userName;
}
return $sameLevelUsers;
}
in modules/Users/models/Record.php
The solution isn't complex
we created the function getSameRolelUsersWithSubordinates()
renamed "Users having Same Role or Subordinate Role" -> "Users having
Same Level or Subordinate Role"
and added a new option in the Role form:
and it works as intended.
I will push a commit on code.vtiger.com in the next hours
Any comment on this new feature is appreciated
Bye for now
Vincenzo
Il 28/01/25 17:38, Rubén A. Estrada Orozco ha scritto:
> Looks like a bug to me.
>
> On Tue, Jan 28, 2025 at 8:35 AM Vincenzo Bruno <v.bruno at vinsoft.it> wrote:
>
> Hi vtigers,
>
> I have a problem on users visibility based on "Can Assign Records
> To" role configuration.
>
> I have a fresh VT 8.3 install and created 2 sales roles, SP1 and
> SP2, as in the picture:
>
> SP1 and SP2 have "Can Assign Records To" on "Users having Same
> Role or Subordinate Role"
>
> I removed all precofigured Groups, there are no groups in the
> installed VT.
>
> I then created 3 users in the 2 roles:
>
>
> Then I created 2 contacts for each role
>
> Sharing rules of Contacts module set on Private and inter-role
> visibility enabled:
>
>
> Entity visibility works as expected:
>
>
> The problem is on "Can Assign Records To" = "Users having Same
> Role or Subordinate Role"
>
> because user of SP1 can assign to users of SP2 and vice-versa
>
>
> SP1 and SP2 are not the "Same Role" nor a "Subordinate Role". I
> see them as "Same level role", sharing the same parent Role.
>
> I tried in different installs obtaining the same behaviuor.
>
> Is this a bug or an intended feature?
>
> How can I solve this issue?
>
> Thank you
>
> Vincenzo
>
>
>
>
>
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
>
> _______________________________________________
> http://www.vtiger.com/
--
Vincenzo Bruno
Coopyleft -www.coopyleft.it
tel: 3287252923
Digital Polis (www.digitalpolis.it)
Hacklab Cosenza (www.hlcs.it)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20250128/f29c7f89/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rH8rrUH8642wJ90I.png
Type: image/png
Size: 33415 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20250128/f29c7f89/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schermata del 2025-01-28 14-37-20.png
Type: image/png
Size: 24354 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20250128/f29c7f89/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schermata del 2025-01-28 14-37-34.png
Type: image/png
Size: 51593 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20250128/f29c7f89/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schermata del 2025-01-28 14-37-42.png
Type: image/png
Size: 51818 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20250128/f29c7f89/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schermata del 2025-01-28 14-36-43.png
Type: image/png
Size: 59010 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20250128/f29c7f89/attachment-0014.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schermata del 2025-01-28 15-08-32.png
Type: image/png
Size: 64505 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20250128/f29c7f89/attachment-0015.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schermata del 2025-01-28 14-54-34.png
Type: image/png
Size: 80441 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20250128/f29c7f89/attachment-0016.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schermata del 2025-01-28 15-16-11.png
Type: image/png
Size: 65158 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20250128/f29c7f89/attachment-0017.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schermata del 2025-01-28 14-39-11.png
Type: image/png
Size: 80166 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20250128/f29c7f89/attachment-0018.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schermata del 2025-01-28 14-39-30.png
Type: image/png
Size: 73230 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20250128/f29c7f89/attachment-0019.png>
More information about the vtigercrm-developers
mailing list