[wp-trac] [WordPress Trac] #43210: Introduce singular capabilities for managing individual options

WordPress Trac noreply at wordpress.org
Fri Feb 2 00:21:37 UTC 2018


#43210: Introduce singular capabilities for managing individual options
-------------------------+-------------------------------------------------
 Reporter:  flixos90     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:               |    Version:
  Role/Capability        |   Keywords:  needs-patch 2nd-opinion granular-
 Severity:  normal       |  capabilities
  Focuses:  rest-api     |
-------------------------+-------------------------------------------------
 We've always had `manage_options`, but it's currently impossible whether a
 user can manage a specific option. As part of related tickets dealing with
 more granular capabilities (see
 https://core.trac.wordpress.org/query?status=accepted&status=assigned&status=new&status=reopened&status=reviewing&keywords
 =~granular-
 capabilities&col=id&col=summary&col=status&col=owner&col=type&col=priority&col=milestone&col=component&order=priority),
 I suggest adding a meta capability `manage_option`.

 It should accept (or basically require) the option name as argument. By
 default it should fallback to the regular `manage_options`, but an
 `auth_callback` could be passed to `register_setting()` to tweak the
 permissions there (such an `auth_callback` is already known from
 `register_meta()`).

 This would also be useful for the REST API so that it can use the more
 granular permissions.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43210>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list