-
Notifications
You must be signed in to change notification settings - Fork 53
Feature Request: Improved roles support #151
Copy link
Copy link
Closed
Labels
Description
Love the tool! I have a couple feature requests. First, it would be nice to be able to toggle permissions for the plugin in the tool's settings, as a convenience feature instead of hooking into the aal_init_roles filter. Just a QoL thing.
Second, when using the aal_init_roles filter, it doesn't actually hide the plugin from the user in the menubar. It does restrict their access, but it'd be nice to properly remove the plugin when they don't have the correct role. So instead of:
it's more like this, where it's not displayed at all:
This is the associated code snippet I'm using to model the behavior above. Of course, this would need to be adjusted to handle what roles are actually allowed.
function hide_activity_log_from_editors() {
global $user_ID;
if (!current_user_can('administrator')) {
remove_menu_page('activity_log_page');
}
}
Reactions are currently unavailable

