hongji.li
2023-11-11 df5a7e1ad6835e78b2f9eb7428817b0c23b116bc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Quintiq file version 2.0
#parent: #root
Method ConfigureMenus () id:Method_ApplicationLibMacroPlanner_ConfigureMenus
{
  #keys: '[132894.0.802853574]'
  Body:
  [*
    // Hide menus that have all of their submenus hidden 
    // otherwise there will be display error when thin client
    // is launched
    
    // Here we check for functionalities for submenus of Edit > Functions, if the user
    // doesn't have access to all the functionalities of its submenus, we need to also
    // hide Edit > Functions                                
     
    isadmin := MPDomainHandler.IsMemberOfGroup( Functionality::ID_Administrator() );
    MenuSpecial.Visible( isadmin );
    
    // Check pegging
    ispegging := MPDomainHandler.IsMemberOfGroup( Functionality::ID_Pegging() );
    MenuPegging.Visible( ispegging );
    
    // Check workflow
    isworkflow := MPDomainHandler.IsMemberOfGroup( Functionality::ID_Workflow() );
    MenuEditWorkflow.Visible( isworkflow );
    
    endresult := isadmin or ispegging or isworkflow;
    
    // If all 3 are not visible, hide their mother menus
    MenuFunctions.Visible( endresult );
    MenuSeparatorFunctions.Visible( endresult );
  *]
}