ui script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2024 04:04 AM
how to get the roles of logged in user in ui script. tried g_user.hasRole . not working.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2024 04:24 AM
Can you explain your requirement and purpose ....
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2024 04:33 AM
i had added the ui script for redirecting in side ec_url_whitelist ui script of ESC portal. but this redirecting will happen only for certain role.
if (!g_user.hasRoleExactly('itil') && window.location.toString().indexOf(''XYZ'') > 0) {
// var url = window.location.href;
// url = url.replace('abc, 'pqr');
// window.location.assign(url);
// }
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2024 07:28 AM
here in oob ui script they have used user. how it is configured?