how to hide workspace for specific groups or role

Su Tyagi
Tera Contributor

Hi all,

I want to hide asset workspace from specific groups. I tried using ACL for ux path but didn't get any success.

Any happy would be highly appreciated,

 

Thanks

Su

13 REPLIES 13

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Su Tyagi 

 

https://www.servicenow.com/community/app-engine-forum/how-to-hide-a-workspace-based-on-group/m-p/323...

 

https://www.servicenow.com/community/app-engine-forum/workspaces-how-to-hide-restrict-users-workspac...

 

To hide a workspace, you can configure 2 read ACLs of ‘type:ux_route’

for that workspace and add required roles to allow users to access it.

  1. Read ACL type ux_route with name = now.<workspace URL path>.home
  2. Read ACL type ux_route with name = now.<workspace URL path>.*

For example:
To hide access to CSM/FSM workspace,

  1. Get the workspace URL Path by navigating to the table: "sys_ux_page_registry"
  2. URL path for the record: "CSM/FSM Configurable Workspace" is "cwf/agent"
  3. Configure one read ACL of type: "ux_route" with Name: now.cwf.agent.home and another read ACL type: ux_route with the Name: now.cwf.agent.* and add required roles to these ACLs in order to allow users with mentioned roles only can access the workspace.
  4. If the workspace URL contains "/" replace it with "." in the ACL name.
*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@Su Tyagi 

you should update the below ACL (type=ux_route) and use Advanced script

answer = !gs.getUser().isMemberOf('Group Name');

AnkurBawiskar_0-1756358661662.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I am using the same excat script for same the ACL type=ux_path, but in Global application. But let me try in Asset application once.

@Su Tyagi 

yes please create in correct scope and type should be ux_route

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader