Open ollietreend opened 9 years ago
Related #414
This was posted a year ago, is there any update on this? Every user role is getting the plugin installation and activation nags even though these should only be showed to administrators.
thanks
@cjgrasso A lot was done - see PR #507.
@jrfnl thank you for the help.
@jrfnl how do i actually go about disabling these notices for non-super-admins?
@paulcanning You hook into the tgmpa_show_admin_notice_capability
filter and return a different capability.
See the first bullet in Enhancements in the TGMPA 2.6.0 changelog, as well as the detailed description in PR #507.
Does that answer your question ?
Hi,
It would be great to have an configuration option which disables the 'There is an update available' prompt for plugins. It would be even better if this could be selectively disabled, based on whether the user has permission to install plugin updates.
One problem I'm currently faced with is that I have non-administrator users using the WordPress admin interface. If there are updates available for required plugins, they see a prompt which says 'Sorry, but you do not have the correct permissions to update the [...] plugin.'
This message appears at the top of every page for my non-administrator users, until an administrator logs in and performs the necessary updates. Not only is the wording of this message confusing for users – because it suggests that the user has tried to perform an action (update plugins) which they didn't – but it also adds an annoying nag which appears at the top of every page.
In this screenshot I am logged in as an Editor. I have simply loaded the 'All Pages' list, and haven't attempted to perform any plugin updates. But I am greeted with a warning message to tell me that I don't have permission. This is not a good user experience.
I've looked into the TGM class to resolve this, but I can't see any convenient actions or filters for me to hook in to. Nor can I find a configuration option to disable update nags.
Your thoughts and ideas for implementation would be great. I'm thinking either a configuration option, or the ability to hook into a filter (or even both) would provide suitable flexibility. Beyond that, perhaps there is no need to show the 'Sorry' message at all when a user doesn't have permission to perform updates – after all, they didn't try to install anything, so why should they see the message?