The CreatorCon Call for Content is officially open! Get started here.

How to show variable to a specific role/group

Souvick6917
Tera Contributor

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

2 ACCEPTED SOLUTIONS

Anand Kumar P
Giga Patron

Hi @Souvick6917 ,

In that variables you can see the Permissions tab to can define role  so that specific users can only see variables

AnandKumarP_0-1709534374119.png

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

 

View solution in original post

Aniket Chavan
Tera Sage
Tera Sage

Hello @Souvick6917,

You can restrict the variable visibility by using Permission section from your variable, please see the attached image down below,

AniketChavan_0-1709535490914.png


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.

 

View solution in original post

7 REPLIES 7

Anand Kumar P
Giga Patron

Hi @Souvick6917 ,

In that variables you can see the Permissions tab to can define role  so that specific users can only see variables

AnandKumarP_0-1709534374119.png

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

 

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

Sohail Khilji
Kilo Patron

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.

SohailKhilji_0-1709534850860.png

 

 

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....

LinkedIn - Lets Connect

Aniket Chavan
Tera Sage
Tera Sage

Hello @Souvick6917,

You can restrict the variable visibility by using Permission section from your variable, please see the attached image down below,

AniketChavan_0-1709535490914.png


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.