Making WordPress.org

Changeset 7649


Ignore:
Timestamp:
09/10/2018 07:36:18 AM (6 years ago)
Author:
vedjain
Message:

WordCamp: Use same capability for WordCamp and Meetup event management.

This will allow our deputies to edit Meetup Applications as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-subroles.php

    r6187 r7649  
    77
    88namespace WordCamp\SubRoles;
     9use WordPress_Community\Applications\Meetup_Application;
     10
    911defined( 'WPINC' ) || die();
    1012
     
    154156                }
    155157            }
     158
     159            if ( Meetup_Application::POST_TYPE === $post_type ) {
     160                // Use same permission for meetups as well as wordcamps.
     161                // TODO: In future consider changing this to wrangle_events
     162                if ( $current_user && $current_user->has_cap( 'wordcamp_wrangle_wordcamps' ) ) {
     163                    $required_caps[] = 'wordcamp_wrangle_wordcamps';
     164                }
     165            }
    156166            break;
    157167    }
Note: See TracChangeset for help on using the changeset viewer.