- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2024 10:24 PM - edited 03-03-2024 10:25 PM
Hi All,
I have a requirement to restrict 2 variables visibility to a specific role/group. Only users containing the specific role will be able to view and work on the 2 variables of the catalog item.
Please provide help to achieve this requirement.
Regards
Souvick
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2024 10:42 PM - edited 03-03-2024 10:43 PM
Hi @Souvick6917 ,
In that variables you can see the Permissions tab to can define role so that specific users can only see variables
Or
You can create onload catalog client script
function onLoad() {
if (!g_user.hasRole('admin')){
g_form.setDisplay('variable1', false);
}
else{
g_form.setDisplay('variable1', true);
}
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2024 10:59 PM - edited 03-04-2024 02:05 AM
Hello @Souvick6917,
You can restrict the variable visibility by using Permission section from your variable, please see the attached image down below,
Please let me know if you have any further doubts or any blockers , so that we can discuss accordingly.
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks & Regards,
Aniket.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2024 10:42 PM - edited 03-03-2024 10:43 PM
Hi @Souvick6917 ,
In that variables you can see the Permissions tab to can define role so that specific users can only see variables
Or
You can create onload catalog client script
function onLoad() {
if (!g_user.hasRole('admin')){
g_form.setDisplay('variable1', false);
}
else{
g_form.setDisplay('variable1', true);
}
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 11:18 AM
Hi Anand,
How to show variable to a specific group? Those fields must be visible only to the members of that group?
plz provide solution
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2024 10:45 PM - edited 03-03-2024 10:47 PM
Hi @Souvick6917 ,
Open the catalog item > Open the variable which you want to limit the visiblity.
2. Go to 'Permission tab' > were you can see Read, write and create roles.
3. Add the role in 'Read Role' and save the form.
The specific catalog variable will only be visible to the user who has role to access it...
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2024 10:59 PM - edited 03-04-2024 02:05 AM
Hello @Souvick6917,
You can restrict the variable visibility by using Permission section from your variable, please see the attached image down below,
Please let me know if you have any further doubts or any blockers , so that we can discuss accordingly.
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks & Regards,
Aniket.