I've got two custom roles in my application: super_administrator
and liaison
. In the context of the manage users page, super admins can do anything, but liaisons
are read only. Super admins can see all users registered in the application, but liaisons can only see users in the same college as them (handled through a meta key).
When a liaison is logged in and goes to the users page, I want them to be able to see all users at their college (this is already working), but not edit them.
I did some trickery with the user_row_actions
filter to remove the edit (and delete) button, and I removed the bulk actions container whenever they're logged in as a liaison.
However, they can still click the name of a user and go to the page there and edit. Is there any way I can prevent this?