Conditionally Render based on Permission Set?

  • 2
  • Question
  • Updated 4 years ago
Can I conditionally render an element based on a user's permission set?  I tried to create a model off the Permission Set Assignment object that looks at the running user and the Permission Set ID in question.  As an admin, I can see on my page the assigned users in a table.  So I changed the criteria on my Permission Set model to be assigned user = running user, and permission set = MyPermissionSet.  It doesn't seem to work... I think because users don't have native access to the Permission Set objects.  Is there another way I can render a tab on a page based on a permission set?
Photo of Chandra V

Chandra V, Champion

  • 7,560 Points 5k badge 2x thumb

Posted 4 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,678 Points 20k badge 2x thumb
Sorry Chandra, We do not support using permission sets for conditional rendering. 

If users don't have access to the object though - and component built on it will not show.  So you might get the effect you are looking for automatically.