WordPress.org

Make WordPress Core

Opened 7 months ago

Last modified 5 weeks ago

#42404 new enhancement

Introduce singular capabilities for managing individual plugins

Reported by: johnbillion Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Role/Capability Keywords: needs-unit-tests granular-capabilities has-patch needs-testing
Focuses: administration Cc:

Description

In #38652, singular capabilities were added for activating and deactivating individual plugins.

The same should be added for other management actions for plugins:

  • edit_plugin (ability to adit plugin via the Plugin Editor)
  • delete_plugin (ability to outright delete the plugin)
  • update_plugin (ability to update a plugin)

Network activation and deactivation will be handled in #42403

Attachments (5)

42404.patch (4.4 KB) - added by antonioeatgoat 6 months ago.
Handled singular capability 'delete_plugin'. It still needs unit tests.
42404.2.patch (3.1 KB) - added by antonioeatgoat 6 months ago.
Handled singular capability 'edit_plugin'. It still needs unit tests.
42404.3.patch (578 bytes) - added by antonioeatgoat 6 months ago.
Small fix for the 'delete_plugin' capability.
42404.4.patch (8.9 KB) - added by antonioeatgoat 6 months ago.
Handled singular capability 'update_plugin'. It still needs unit tests.
screenshot1.jpg (219.5 KB) - added by antonioeatgoat 6 months ago.
A quick clarification of the behavior of 'update_plugin'

Download all attachments as: .zip

Change History (7)

@antonioeatgoat
6 months ago

Handled singular capability 'delete_plugin'. It still needs unit tests.

@antonioeatgoat
6 months ago

Handled singular capability 'edit_plugin'. It still needs unit tests.

@antonioeatgoat
6 months ago

Small fix for the 'delete_plugin' capability.

@antonioeatgoat
6 months ago

Handled singular capability 'update_plugin'. It still needs unit tests.

@antonioeatgoat
6 months ago

A quick clarification of the behavior of 'update_plugin'

#1 @antonioeatgoat
6 months ago

  • Keywords has-patch needs-testing added; needs-patch removed

The implementation of 'update_plugin' has been more complex than the others, it would need to be tested further.

Also it needs a second opinion about the creation of the new function wp_get_plugin_updates_disallowed_count() (naming and behavior), and the general behavior (sorry for the typo):

A quick clarification of the behavior of 'update_plugin'

Last edited 6 months ago by antonioeatgoat (previous) (diff)

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


5 weeks ago

Note: See TracTickets for help on using tickets.