Menu

Hide Data Administration in left menu pane

2018-04-11
2023-05-30
  • Jelle Defoort

    Jelle Defoort - 2018-04-11

    I'm making custom user profiles with different possibilities in iTop depending on the skills and what those profiles need.
    One of the main features to keep it as simple as possible for those users is to disable/hide everything they don't need.
    I used some code to hide most of the left menu for all people, depending on their grant matrix and their possibility to modify things or not.
    e.g.:

     <menu id="ServiceManagement" xsi:type="MenuGroup" _delta="redefine">
         <rank>60</rank>
         <enable_class>Service</enable_class>
         <enable_action>UR_ACTION_MODIFY</enable_action>
         <enable_stimulus/>
       </menu>
       <menu id="ProblemManagement" xsi:type="MenuGroup" _delta="redefine">
         <rank>42</rank>
         <enable_class>Problem</enable_class>
         <enable_action>UR_ACTION_MODIFY</enable_action>
         <enable_stimulus/>
       </menu>
    

    The problem I'm facing is the following:
    I don't want people (other than the admins) to see the 'Data Administration' on the left menu pane.
    But when I do the following:

    <menu id="DataAdministration" xsi:type="MenuGroup" _delta="redefine">
         <rank>70</rank>
         <enable_class>Organization</enable_class>
         <enable_action>UR_ACTION_MODIFY</enable_action>
        <enable_stimulus/>
       </menu>
    

    People can still see it, since they (apparently) have rights to work in that.
    If I add the admin only part like this:

    <menu id="DataAdministration" xsi:type="MenuGroup" _delta="redefine">
         <rank>70</rank>
         <enable_admin_only>1</enable_admin_only> 
         <enable_class>Organization</enable_class>
         <enable_action>UR_ACTION_MODIFY</enable_action>
        <enable_stimulus/>
       </menu>
    

    It won't work anymore, since people apparantly need this to be able to log in?

    So my question now is: how can I still hide this, without breaking things?
    Fyi: This specific user profile has the following reading rights:

     <group id="General">
                <actions>
                  <action id="action:read">allow</action>
                  <action id="action:bulk read">allow</action>
                  <action id="action:write">allow</action>
                  <action id="action:bulk write">allow</action>
                  <action id="action:delete">allow</action>
                  <action id="action:bulk delete">allow</action>
                </actions>
              </group>
              <group id="Documentation">
                <actions>
                  <action id="action:read">allow</action>
                  <action id="action:bulk read">allow</action>
                  <action id="action:write">allow</action>
                  <action id="action:bulk write">allow</action>
                  <action id="action:delete">allow</action>
                  <action id="action:bulk delete">allow</action>
                </actions>
              </group>
    
               <group id="ConfigManagement">
                <actions>
                  <action id="action:read">allow</action>
                  <action id="action:bulk read">allow</action>
                  <action id="action:write">allow</action>
                  <action id="action:bulk write">allow</action>
                  <action id="action:delete">allow</action>
                  <action id="action:bulk delete">allow</action>
                </actions>
              </group>
    

    At this moment they see the following menu items:
    - welcome
    - config management
    - data administration

     
  • kris ivan macaro

    Hello , Did you hide problem management in selected profile ? thanks

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.