[wp-trac] [WordPress Trac] #39156: Introduce singular capabilities for managing individual sites on a network

WordPress Trac noreply at wordpress.org
Thu Dec 29 16:12:52 UTC 2016


#39156: Introduce singular capabilities for managing individual sites on a network
-------------------------------------------------+-------------------------
 Reporter:  johnbillion                          |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Networks and Sites                   |  Release
 Severity:  normal                               |     Version:  3.0
 Keywords:  2nd-opinion has-patch needs-refresh  |  Resolution:
                                                 |     Focuses:  multisite
-------------------------------------------------+-------------------------

Comment (by flixos90):

 Based on the discussion on the two tickets, I would like to give an
 updated summary of what I suggest to do here:

 * introduce capability `manage_site` and map it to `manage_sites`
 * revamp the capability `delete_site` (only use it for actual deletion,
 not deactivation) and map it to `delete_sites`
 * introduce capabilities `manage_site_settings`, `manage_site_themes` and
 `manage_site_users` and map them to the new `manage_site`; I think instead
 of introducing `manage_site_info` we should rely on `manage_site` for that
 tab
 * introduce capabilities `archive_site`, `spam_site`, `activate_site`
 (this is now for site (de-)activation) and `mature_site` and map them to
 the new `manage_site`
 * for the one case where a site administrator can deactivate their own
 site, I think we should use the new `activate_site` capability and in its
 `map_meta_cap()` clause map to `manage_options` if the current user is a
 user on that site (from the site admin panel we would pass the site ID
 simply via `get_current_blog_id()`)

 All the capabilities mentioned above (except the existing `manage_sites`
 obviously) should be passed a site ID.

 What we need to do as well is figure out in which areas of core such
 capabilities could apply. I already noticed a few areas for
 `archive_site`, `spam_site`, `activate_site` and `mature_site` that I
 missed in [attachment:39156.diff].

 I will create an updated patch with these changes soon. Feedback on this
 take on the new capabilities is much appreciated. :)

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


More information about the wp-trac mailing list