How to set the rule for correct viewing?

Arthur Sanchez
Giga Guru
Please see my application
Captura de tela 2024-05-15 162032.pngCaptura de tela 2024-05-15 162047.pngCaptura de tela 2024-05-15 162108.png
 

 

(function overrideView(view, is_list) {

    if (gs.getUser().hasRole("x_1316384_register.tickets_user"))
        answer = "User";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_manager"))
        answer = "Manager";  // set the new view to answer

	if (gs.getUser().hasRole("x_1316384_register.tickets_acs_n1"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_acs_n2"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_ims_n1"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_ims_n2"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_sms_n1"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_sms_n2"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_app_n1"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_app_n2"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_brm_n1"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_brm_n2"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_capta_n1"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_capta_n2"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_gpp_n1"))
        answer = "Support";  // set the new view to answer
    
    if (gs.getUser().hasRole("x_1316384_register.tickets_gpp_n2"))
        answer = "Support";  // set the new view to answer
		
})(view, is_list);

 

the modules 'that' are separators,

The 'create new ticket' module is the only one that creates something in the form,

and the other modules are list or records

My creation module currently looks like this:
Captura de tela 2024-05-15 162501.png
The only role that has access is 'tickets_user'

My problem is, I created a new user and gave him the 'User' and 'Support' roles, but when I enter this user into the application, I have access to the user and support module, BUT, the list layout and the forms are ALL from support, and that's what's causing the problem.

when it enters it is directed to the list layout and support form in all modules, and I want it to be in the User modules which are: 'Your Tickets, My Tickets and Create New Ticket' he has the view and access to the user form, and when he enters the other modules which are the Support modules he sees the view and the support form.

 

Does anyone know why this problem is occurring and how to resolve it?

0 REPLIES 0