<div dir="ltr">Thanks for that Vicenzo. It's good to know what you discovered and great to have the additional feature.<br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Jan 28, 2025 at 11:06 AM Vincenzo Bruno <<a href="mailto:v.bruno@vinsoft.it">v.bruno@vinsoft.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
    
  
  <div>
    <p><font size="4">My team investigated furter and it's a 
        feature.....</font></p>
    <p><font size="4">The option "Users having Same Role or Subordinate
        Role"  calls the function</font></p>
    <p><b><font size="4">public function get<u>SameLevel</u>UsersWithSubordinates(){</font></b></p>
    <p><font size="4">$currentUserRoleModel =
        Settings_Roles_Record_<a>Model::getInstanceById($this</a>->getRole());<br>
                $sameLevelRoles = $currentUserRoleModel-><b>getSameLevelRoles()</b>;<br>
                $sameLevelUsers = $this-><b>getAllUsersOnRoles($sameLevelRoles)</b>;<br>
                $subordinateUsers =
        $this->getRoleBasedSubordinateUsers();<br>
                foreach ($subordinateUsers as $userId => $userName) {<br>
                    $sameLevelUsers[$userId] = $userName;<br>
                }<br>
                return $sameLevelUsers;<br>
            }<br>
      </font></p>
    <p><font size="4">in modules/Users/models/Record.php</font></p>
    <p><font size="4"><br>
      </font></p>
    <p><font size="4">The solution isn't complex</font></p>
    <p><font size="4">we created the function
        getSameRolelUsersWithSubordinates()</font></p>
    <p><font size="4">renamed </font><font size="4">"Users having Same
        Role or Subordinate Role" -> </font><font size="4">"Users
        having Same Level or Subordinate Role"</font></p>
    <p><font size="4">and added a new option in the Role form:</font></p>
    <p><font size="4"><img src="cid:ii_194ae1a057489d777291" alt="" width="561" height="330" border="1"><br>
      </font></p>
    <p><font size="4">and it works as intended.</font></p>
    <p><font size="4">I will push a commit on <a href="http://code.vtiger.com" target="_blank">code.vtiger.com</a> in the
        next hours<br>
      </font></p>
    <p><font size="4">Any comment on this new feature is appreciated<br>
      </font></p>
    <p><font size="4">Bye for now</font></p>
    <p><font size="4">Vincenzo<br>
      </font></p>
    <p><font size="4"><br>
      </font></p>
    <div>Il 28/01/25 17:38, Rubén A. Estrada
      Orozco ha scritto:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Looks like a bug to me.<br>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, Jan 28, 2025 at
          8:35 AM Vincenzo Bruno <<a href="mailto:v.bruno@vinsoft.it" target="_blank">v.bruno@vinsoft.it</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>Hi vtigers,</p>
            <p>I have a problem on users visibility based on "Can Assign
              Records To" role configuration.</p>
            <p>I have a fresh VT 8.3 install and created 2 sales roles,
              SP1 and SP2,  as in the picture:</p>
            <img src="cid:ii_194ae1a0574c721bbe32" alt="" width="626" height="471" border="1">
            <p>SP1 and SP2 have  "Can Assign Records To" on  "Users
              having Same Role or Subordinate Role"</p>
            <p><img src="cid:ii_194ae1a0574c90ef2863" alt="" width="658" height="474" border="1"><img src="cid:ii_194ae1a0574caa79c234" width="658" height="473" alt="" border="1"></p>
            <p>I removed all precofigured Groups, there are no groups in
              the installed VT.<br>
            </p>
            <p>I then created 3 users in the 2 roles:<br>
            </p>
            <p><br>
            </p>
            <img src="cid:ii_194ae1a057462d486c55" alt="" width="814" height="567" border="1">
            <p>Then I created 2 contacts for each role <br>
            </p>
            <p><img src="cid:ii_194ae1a05748eb56216" alt="" width="811" height="386" border="1"></p>
            <p>Sharing rules of Contacts module set on Private and
              inter-role visibility enabled:</p>
            <img src="cid:ii_194ae1a0574b9f449eb7" width="811" height="397" alt="" border="1">
            <p><br>
            </p>
            <p>Entity visibility works as expected:<br>
            </p>
            <p><img src="cid:ii_194ae1a0574c9f5a2a58" width="809" height="502" alt="" border="1"></p>
            <p><br>
            </p>
            <p>The problem is on "Can Assign Records To" =  "Users
              having Same Role or Subordinate Role"</p>
            <p>because user of SP1 can assign to users of SP2 and
              vice-versa</p>
            <img src="cid:ii_194ae1a0574953d54839" width="735" height="456" alt="" border="1"><img src="cid:ii_194ae1a05749898ee40a" width="736" height="457" alt="" border="1">
            <p><br>
            </p>
            <p>SP1 and SP2 are not the "Same Role" nor a "Subordinate
              Role". I see them as "Same level role", sharing the same
              parent Role.<br>
            </p>
            <p>I tried in different installs obtaining the same
              behaviuor.</p>
            <p>Is this a bug or an intended feature? <br>
            </p>
            <p>How can I solve this issue?<br>
            </p>
            <p>Thank you</p>
            <p>Vincenzo<br>
            </p>
            <p><br>
            </p>
            <p><br>
            </p>
            <p><br>
            </p>
            <p><br>
            </p>
            <p><br>
            </p>
            <p><br>
            </p>
            <p><br>
            </p>
          </div>
          _______________________________________________<br>
          <a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a></pre>
    </blockquote>
    <pre cols="72">-- 
Vincenzo Bruno
Coopyleft - <a href="http://www.coopyleft.it" target="_blank">www.coopyleft.it</a>
tel: 3287252923
Digital Polis (<a href="http://www.digitalpolis.it" target="_blank">www.digitalpolis.it</a>)
Hacklab Cosenza (<a href="http://www.hlcs.it" target="_blank">www.hlcs.it</a>)
    
</pre>
  </div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>