Show Hide component based on the assigned permission set

I have a skuid page with multiple tabs and I want to render and display tabs based on the permission set assigned for the current user,
Is there a way of doing this? or any alternatives?

Thanks In advance

Two alternatives:

(a) Render based on the user’s Profile Name or Id

(b) Render based on whether a User’s Profile or Permission Set gives them access to a Custom Permission. Create Custom Permissions in Salesforce Setup, e.g. “Can View Tab A”, “Can View Tab B”, etc. or “Can View Activities Tabs”, “Can View Case Tabs”, etc. Then, create 1 or more Formula Fields on the User object in Salesforce that describe whether the User has these Custom Permissions. You could use a Boolean field for each Permission, e.g. “User_Can_View_Activities_Tabs” whose formula is IF($Permission.User_Can_View_Activities_Tabs,true,false) , or you could use a single String field that dumps out the names of all the Permissions that the user does have access to, e.g.

IF($Permission.Can_View_Activities_Tabs,‘Can View Activities Tabs’,‘’)
& “,” IF($Permission.Can_View_Contacts_Tabs,‘Can View Contacts Tabs’,‘’)
& “,” IF($Permission.Can_View_Notes_Tabs,‘Can View Notes Tabs’,‘’)

Then you would add a “RunningUser” Model to your Skuid Page(s) that requests this/these Formula Fields on the User object for the running user, and then you can do Conditional Rendering based on the values in these Formula Fields in the row in this Model.

Hi @Zach,
Thank you for the reply,

To access profile name or permission set we need “View Setup and Configuration” enabled on profile or permission set so then only we can access the profile model to check for the profile name. We do not want users to see the setup and configuration stuff.

It seems the only way of going forward is the hard coded profile ID.

Thanks again and this replay helped me a lot.

Hi Hasantha, you are correct about Permission Sets, the PermissionSetAssignment object is only visible to users who have the View Setup and Configuration permission.

However regarding Profile Name, as of the Skuid Banzai release, Profile Name is available as a standard Conditional Rendering “Running User Attribute” property, without having to use a separate Model, and this works for any User, they don’t need to have View Setup and Configuration for this to work.

The use of Custom Permissions and a custom User field is a great way to get around Customer Community Users’ lack of access to Permission Set and Permission Set Assignment objects. Still useful post three years later!

Has Skuid figured out how to use Custom Permissions for rendering yet, like Salesforce does on Lightning pages?
The whole purpose of custom permissions is to NOT have to use so many custom fields on the user object to decide what the user can access.