-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No permissions admin notice #414
Comments
That completely depends on the kind of site. For a large multi-user site, I can see your point. What about if we add a capability-check for which users can see it ? Something like author minimum ? |
That's common sense already. I guess the problem is that the details of which plugins are shown, when the user can't do anything about any plugins. How about author minimum, but also make the text generic like "This site requires one or more plugins that are not installed. Contact the ..."? |
May be we should also consider to only show the notice if required plugins need to be installed or updated. And not show anything at all to non-admins if the notice would only deal with recommended plugins. |
And now that updating is in - if the user has dismissed the message before, it would not show for new updates anymore. That kind of feels wrong as well. Basically I think we may need to rename issue #353 to "Refactor/rethink complete notices logic" and collect all the different bits there. And we need to think through whether that should be something we still want to do for 2.5. It is already on the roadmap for 3.0 |
I'm running into the same issue. My thought is that it would make sense to set the minimum user role or capability for which the notice should be displayed. That'd be a pretty simple fix. |
Definitely not a 2.5.0 thing. Either add a capability check in 2.6.0, or rewrite completely for 3.0.0 |
By default the following logic will be used: User < 'publish_posts': no admin notices User < install/update/activate: "contact administrator notice" without disclosing information about the plugins involved and only if there are *required* plugins which require action. User = install/update/activate: "normal" notices The minimum user level for which admin notices are shown at all can be adjusted by using the newly introduced `tgmpa_show_admin_notice_capability` filter. The default is set to 'publish_posts', i.e. Authors. Example: add_filter( 'tgmpa_show_admin_notice_capability', create_function( '$cap', 'return \'edit_pages\';' ) ); To only show the admin notices to network admins on multisite, set it to a super admin capability like 'manage_network_plugins'. Note: the `notices()` function is ugly and in desperate need of refactoring, that is not handled in this PR (which only makes it worse). Fixes #190, #414 Supersedes: https://github.com/INN/Largo/pull/740/files Partially fixes #479, #489 - notice will now only show for required updates for non-admin users with level author or editor. Possibly fixes #492, though more information is needed on the actual case.
By default the following logic will be used: User < `'publish_posts'` (=Author): no admin notices User < install/update/activate: "contact administrator notice" without disclosing information about the plugins involved and only if there are *required* plugins which require action. User = install/update/activate: "normal" notices The minimum user level for which admin notices are shown at all can be adjusted by using the newly introduced `tgmpa_show_admin_notice_capability` filter. The default capability is set to `'publish_posts'`. Example: add_filter( 'tgmpa_show_admin_notice_capability', create_function( '$cap', 'return \'edit_pages\';' ) ); Another example: To only show the admin notices to network admins on multisite, set it to a super admin capability like `'manage_network_plugins'`. Note: the `notices()` function is ugly and in desperate need of refactoring, that is not handled in this PR (which only makes it worse). Fixes #190, #414 Supersedes: https://github.com/INN/Largo/pull/740/files Partially fixes #479, #489 - notice will now only show for required updates for non-admin users with level author or editor. Possibly fixes #492, though more information is needed on the actual case.
By default the following logic will be used: User < `'publish_posts'` (=Author): no admin notices User < install/update/activate: "contact administrator notice" without disclosing information about the plugins involved and only if there are *required* plugins which require action. User = install/update/activate: "normal" notices The minimum user level for which admin notices are shown at all can be adjusted by using the newly introduced `tgmpa_show_admin_notice_capability` filter. The default capability is set to `'publish_posts'`. Example: add_filter( 'tgmpa_show_admin_notice_capability', create_function( '$cap', 'return \'edit_pages\';' ) ); Another example: To only show the admin notices to network admins on multisite, set it to a super admin capability like `'manage_network_plugins'`. Note: the `notices()` function is ugly and in desperate need of refactoring, that is not handled in this PR (which only makes it worse). Fixes #190, #414 Supersedes: https://github.com/INN/Largo/pull/740/files Partially fixes #479, #489 - notice will now only show for required updates for non-admin users with level author or editor. Possibly fixes #492, though more information is needed on the actual case.
On logging in to another site where I'm not an administrator, I saw:
While it's obviously good that a normal user can't install plugins, I don't think this message serves any purpose in being shown at all. As a user, I should not need to know what plugins a site should be running. Let's hide the message altogether and remove the associated strings that are currently being shown, and return early from any admin notice functions.
The text was updated successfully, but these errors were encountered: