We have a Visualforce Contact
page in our managed package where there are a number of Actions, e.g.
- Go to VF page 1
- Go to VF page 2
- Render component
- Execute this javascript
Right now we have universal permissions to show or hide these links. The client wants to make them visible on a user level, but using some kind of groups rather than the more tedious option of using checkboxes on the User object.
So dealing with individual users is out.
Using Profiles I imagine is too broad as there are lots of different combinations for each user.
At first I thought of using Public Groups
, but I don't think there is any way to add checkboxes other than using a custom object with a lookup to a Group
. Even then, I don't think this is an option because you can't fire a trigger for the Group
object and so I wouldn't be able to keep it in sync easily.
I then thought of using Permission Sets which contain Visualforce Page Access / Apex Class Access. I could then query the PermissionSet object in Apex. But then it gets complicated if I want to restrict a javascript call because I can't seem to customize a permission set's App/System Permissions to include "Can Execute JS Call 1".
It doesn't seem like this should be a big deal but I can't think of how to implement. Can anyone help?