Menu

Hide modules in left pane for some profile

Kalicharan
2013-12-12
2024-06-17
  • Kalicharan

    Kalicharan - 2013-12-12

    Hi Guys.

    I want to Hide service Management,problem and change for some profile, i can modify grant matrix create , modify and delete.

    But my goal is to Hide the few module in left pane for some profile.

    If any One have Idea .. please suggest me.

    Best Regards

     
  • dan corm

    dan corm - 2013-12-16

    If you goal is to have a profile in which ONLY the Service management screen is hidden you should be in luck - as long as you don't intend that person to also be acting as an administrator and require access to the "Admin Tools" area.

    What nodes display in the left nav also relies on the type of install you've done, if you've selected simple ticketing or ITIL, etc etc.. I'll assume you want them to have access to all except Admin Tools and Service Management.

    If you are looking to create a new profile, you will need to create an extension. There is some excellent documentation here: https://wiki.openitop.org/doku.php?id=customization:add-profile-sample

    You will likely need to either explicitly allow this profile access to all objects EXCEPT "Service" and "LnkServices" or explicitly deny access to "Service" and "LnkServices".

    The Service Manager profile has the following group nodes specified:

     <group id="Service">
                <actions>
                  <action xsi:type="write">allow</action>
                  <action xsi:type="bulk write">allow</action>
                  <action xsi:type="delete">allow</action>
                </actions>
              </group>
              <group id="LnkServices">
                <actions>
                  <action xsi:type="delete">allow</action>
                </actions>
              </group>
    

    Your profile will be quite the opposite of the above. To get you started you can generate the necessary customization files at the above mentioned wiki page. Test it out in your dev environment first!

     
  • metafaniel

    metafaniel - 2015-03-02

    Hi, I'm attempting to do something similar.
    As far as I understood, it's all about profiles, right? But I didn't understand very good your explanation...

    I'd like a given user profile NOT able to see the following menus in the left pane (drawers):

    Problem Management
    Change management
    Service Management
    Data administration
    Admin tools
    

    And I'd like the profile to be able to see only this menus:

    Helpdesk
    Incident Management
    

    So I have to create a new extension, modify the XML file "datamodel.my-custom-menu.xml" and then how can set a menu as visible or as invisible? I still don't get it.

    THANKS

     
    • Mlaura

      Mlaura - 2015-03-03

      Hello,
      I found just one way but once you re-install iTop, you have to set again those modifications:for example in:env_production/itop-knownerror-mgmt/model.itop-knownerror-mgmt.php:       you have to change:
       $comp_menus['ProblemManagement'] = new MenuGroup('ProblemManagement', 42);into $comp_menus['ProblemManagement'] = new MenuGroup('ProblemManagement', 42 'Organization', UR_ACTION_MODIFY, UR_ALLOWED_YES);
      I hope this helpciao ciaoLaura

       Il Lunedì 2 Marzo 2015 21:56, metafaniel <metafaniel@users.sf.net> ha scritto:
      

      Hi, I'm attempting to do something similar.
      As far as I understood, it's all about profiles, right? But I didn't understand very good your explanation...I'd like a given user profile NOT able to see the following menus in the left pane (drawers):Problem Management
      Change management
      Service Management
      Data administration
      Admin tools
      And I'd like the profile to be able to see only this menus:Helpdesk
      Incident Management
      So I have to create a new extension, modify the XML file "datamodel.my-custom-menu.xml" and then how can set a menu as visible or as invisible? I still don't get it.THANKSHide modules in left pane for some profileSent from sourceforge.net because you indicated interest in https://sourceforge.net/p/itop/discussion/922360/To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • metafaniel

    metafaniel - 2015-03-23

    Hi @Mlaura
    I tried your solution, but even with your changes I can still see the Problem Management menu on the left pane. I even tried to comment all the $__comp_menus__ code but I can still see and select this menu.
    Thanks anyway!

     
    • Mlaura

      Mlaura - 2015-03-24

      Hi,
      I found also this solution and seems work, at least for me:<menus>
              </menus>


               <rank>20</rank>
               <enable_class>Organization</enable_class>
               <enable_action>UR_ACTION_MODIFY</enable_action>
               <enable_permission>UR_ALLOWED_YES</enable_permission>
             

             
               <rank>50</rank>
               <enable_class>Change</enable_class>
               <enable_action>UR_ACTION_MODIFY</enable_action>
               <enable_permission>UR_ALLOWED_YES</enable_permission>
             

             
               <rank>35</rank>
               <enable_class>Incident</enable_class>
               <enable_action>UR_ACTION_READ</enable_action>
               <enable_permission>UR_ALLOWED_YES</enable_permission>
            

            
               <rank>42</rank>
               <enable_class>Problem</enable_class>
               <enable_action>UR_ACTION_MODIFY</enable_action>
               <enable_permission>UR_ALLOWED_YES</enable_permission>
            

            
              <rank>30</rank>
              <enable_class>UserRequest</enable_class>
              <enable_action>UR_ACTION_READ</enable_action>
              <enable_permission>UR_ALLOWED_YES</enable_permission>
           

           
              <rank>60</rank>
              <enable_class>Service</enable_class>
              <enable_action>UR_ACTION_MODIFY</enable_action>
              <enable_permission>UR_ALLOWED_YES</enable_permission>
           

           
              <rank>25</rank>
             <enable_class>IPv4Object</enable_class>
              <enable_action>UR_ACTION_MODIFY</enable_action>
              <enable_permission>UR_ALLOWED_YES</enable_permission>
         

       
      see youciaoLaura

       Il Lunedì 23 Marzo 2015 21:58, metafaniel <metafaniel@users.sf.net> ha scritto:
      

      Hi @Mlaura
      I tried your solution, but even with your changes I can still see the Problem Management menu on the left pane. I even tried to comment all the $comp_menus code but I can still see and select this menu.
      Thanks anyway!Hide modules in left pane for some profileSent from sourceforge.net because you indicated interest in https://sourceforge.net/p/itop/discussion/922360/To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • Eduardo Galbis

    Eduardo Galbis - 2015-10-20

    Good Morning,

    I found this topic because I have problems when creating a profile or midificar. As happened to metafaniel I need a profile that only you can access Helpdesk, Incident Management.

    I followed the wiki but when I generate the new profile gives me error

    Notice: Undefined index: Portal user - write in /var/www/itop/web/setup/compiler.class.inc.php on line 1844
    
    Warning: Invalid argument supplied for foreach () in /var/www/itop/web/setup/compiler.class.inc.php on line 1846
    
    Notice: Undefined index: Portal user - delete /var/www/itop/web/setup/compiler.class.inc.php on line in 1844
    
    Warning: Invalid argument supplied for foreach () in /var/www/itop/web/setup/compiler.class.inc.php on line 1846
    
    Notice: Undefined index: class: UserRequest /var/www/itop/web/setup/compiler.class.inc.php online in 1844
    
    Warning: Invalid argument supplied for foreach () in /var/www/itop/web/setup/compiler.class.inc.php on line 1846
    

    and the same error happens when I try to file proof of the wiki itself. if someone could help me I would be eternally grateful.

     
  • Jason Woodward

    Jason Woodward - 2016-08-26

    My apologies for resurecting an old post, but I highly doubt I am the only one that still struggles with this. I have my solution documented below. I have NOT figured out how to put this into an extension, if you know how and could post that I would prefer that method over this.

    THIS IS MODIFYING THE BASE CODE!! Do all of this in your test environment first!!!
    In addition chances are you will need to recreate this whever an udpate is made as it changes the base code. Due to that make sure you create detailed notes of what you did so you can recreate your work if needed.

    I have not experimented on the full extent of the impact...so far I know it restricts the SUPPORT AGENT account down to just Welcome and Helpdesk

    First you need to identify the items you are presenting in your side bar. Below is the list of items I used and the pats I needed to update

    Config management - /datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml
    Change Control - /datamodels/2.x/itop-change-mgmt/datamodel.itop-change-mgmt.xml
    Service Management - /datamodels/2.x/itop-service-mgmt/datamodel.itop-service-mgmt.xml
    IP Management - /extensions/teemip-ip-mgmt/datamodel.teemip-ip-mgmt.xml

    Search for the following entry in the code: xsi:type="MenuGroup"

    Default view

        <menu id="ConfigManagement" xsi:type="MenuGroup" _delta="define">
          <rank>20</rank>
        </menu>
    

    Add the following lines

          <enable_class>Organization</enable_class>
          <enable_action>UR_ACTION_MODIFY</enable_action>
          <enable_permission>UR_ALLOWED_YES</enable_permission>
    

    Updated View

        <menu id="ConfigManagement" xsi:type="MenuGroup" _delta="define">
          <rank>20</rank>
          <enable_class>Organization</enable_class>
          <enable_action>UR_ACTION_MODIFY</enable_action>
          <enable_permission>UR_ALLOWED_YES</enable_permission>
        </menu>
    

    Save work
    use the toolkit to validate Data Model
    use the toolkit to Update the ITop code

     

    Last edit: Jason Woodward 2016-08-26
  • Khalil

    Khalil - 2017-12-27

    Hi Jason , Thank you this worked with ConfigManagement, this helped me for hiding ConfigManagement menu but for Change and service management menue it gives error "/itop_design/menu[ServiceManagement] at line 0: could not be modified (not found)

    did you face same issue?

     
  • Khalil

    Khalil - 2018-01-02

    Hi, I found my mistake, I missed to add dependency for my new module it is working fine after adding service management module in dependency
    Thanks

     
  • Mateo S

    Mateo S - 2024-05-17

    Buenas tardes una recomendación que pudo dar para que puedas limitar los menus y que se un control total sobre estos es que tienes que agregar la dependencia de la extension:
    Asi ya tendras libertad de modificar los menus

    'itop-profiles-itil/1.0.0',
    'itop-config-mgmt/2.2.0',

     
  • Mateo S

    Mateo S - 2024-06-13

    Hello everyone,

    I have a problem when applying the 'Delegate 'Admin tools' menus' documentation.

    Paragraph:
    WebPageMenuNode need to be secured against direct access (a user may guess the url of a webPage and try to access it even if he do not see the menu). To do so, each web page is checking against ApplicationMenu::CheckMenuIdEnabled(“MenuId”); with MenuIdbeeing the id used in the xml definition of the menu. This ensure that in order to be able to execute a webpage the user must have access to the corresponding menu.

    In which it mentions in this paragraph that we can add more security by preventing the profile from being able to access that menu from the link.

    However, I don't know how to apply it within the code, so I ask for your collaboration.

     

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.