[wp-trac] [WordPress Trac] #27670: Plugin Information tab - inaccesible without install_plugin capability

WordPress Trac noreply at wordpress.org
Mon Sep 29 15:01:00 UTC 2014


#27670: Plugin Information tab - inaccesible without install_plugin capability
-------------------------------+------------------------------
 Reporter:  FolioVision        |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Role/Capability    |     Version:  3.8.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  administration
-------------------------------+------------------------------

Comment (by FolioVision):

 Hi krafner,

 yes, of course: my colleague meant "'''prohibit'''".

 I'll sum this up once more, to clarify:

 The problem is that, unlike what you are saying, the `install_plugins`
 capability is not only for installing new plugins.

 It is the exact same capability that is being checked when I want to check
 the changelog for a plugin that has an update available.

 The situation: I have a user (admin) with `add_cap("install_plugins",
 FALSE);` and `add_cap("update_plugins", true);`

 This user can update plugins, but cannot see the changelog (the "View
 version x.x.xx details" pop-in in the "There is a new version of Filled In
 available. View version x.x.xx details or update now." message that
 appears under a plugin that has an update available).

 The proposed solution is to change the condition to e.g.:

 `if (( ! current_user_can('install_plugins') ) &&
 plugin_not_installed($plugin_name))`

 or a combination of `install_plugins` and `update_plugins` so that
 installation of new plugins is prohibited but viewing update information
 is allowed.

 Thanks,
 Karol Kosar

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27670#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list