Making WordPress.org


Ignore:
Timestamp:
03/22/2016 06:21:26 AM (9 years ago)
Author:
dd32
Message:

Plugin Directory: Introduce the Plugin Committer/Review & Admin roles. Use the capabilities throughout the core flows of the admin.
This also has a few hacks to make plugin committers/authors only see plugins which they can manage, although a few core bugs remain which cause non-owner committers not to be able to edit plugins properly.

See #1571

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-committers.php

    r2764 r2777  
    3333     */
    3434    public function ajax_user_can() {
    35         return current_user_can( 'manage_committers' );
     35        return current_user_can( 'plugin_remove_committer' );
    3636    }
    3737
     
    150150
    151151        // Check if the committer for this row is removable.
    152         if ( current_user_can( 'list_users' ) ) {
    153             $post_id = get_post()->ID;
     152        $post_id = get_post()->ID;
     153        if ( current_user_can( 'plugin_remove_committer', $post_id ) && $user_object->ID != get_current_user_id() ) {
    154154            $actions['delete'] = "<a class='submitremove' data-wp-lists='delete:the-committer-list:committer-{$user_object->ID}:faafaa:post_id={$post_id}' href='" . wp_nonce_url( 'users.php?action=remove&amp;committer=' . $user_object->ID, "remove-committer-{$user_object->ID}" ) . "'>" . __( 'Remove', 'wporg-plugins' ) . "</a>";
    155155        }
Note: See TracChangeset for help on using the changeset viewer.