Making WordPress.org

Changeset 5421


Ignore:
Timestamp:
04/28/2017 11:40:24 PM (10 years ago)
Author:
coreymckrill
Message:

WordCamp: Use wordcamp_manage_mentors as cap for Mentor Dashboard

This leverages the capabilities defined in the new wcorg-subroles.php
mu-plugin to give Mentor Dashboard access to those with the
mentor_manager subrole.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/mentors/dashboard.php

    r4549 r5421  
    4040                'Mentors',
    4141                'Mentors',
    42                 'manage_network',
     42                'wordcamp_manage_mentors',
    4343                'mentors',
    4444                __NAMESPACE__ . '\render_options_page'
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php

    r5381 r5421  
    540540
    541541            // Only include mentor data if the Mentor username field is editable
    542             if ( current_user_can( 'manage_network' ) ) {
     542            if ( current_user_can( 'wordcamp_manage_mentors' ) ) {
    543543                $data['Mentors']['data'] = Mentors_Dashboard\get_all_mentor_data();
    544544            }
    … …  
    955955                $protected_fields = array();
    956956
    957                 if ( ! current_user_can( 'manage_network' ) ) {
     957                if ( ! current_user_can( 'wordcamp_manage_mentors' ) ) {
    958958                        $protected_fields += array(
    959959                                'Mentor WordPress.org User Name',
Note: See TracChangeset for help on using the changeset viewer.