Getting a role's Build permission in Code studio

Hello

I have a custom theme pack and want to adapt it depending on the user’s Build permissions.

I can get and check the user_role_id from user_object.schema().attributes but it would be better to then know if that role can access Build. Is it possible to do so?

Thanks
James

Hi James
I don’t believe there is any way to get at the permissions etc associated with a role in code studio.

However you can do what you want - simply call

theme_pack.permitted_interfaces()

and check if the build studio is in the array - if they have no rights to build it won’t be there!

RIchard

1 Like

Thanks Richard, thats a good idea and did the job!