Making WordPress.org


Ignore:
Timestamp:
09/16/2016 08:56:17 PM (7 years ago)
Author:
ocean90
Message:

Translate, Rosetta Roles: Add support for the new locale manager role.

See #1398.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php

    r3952 r4083  
    594594            // Check to see if they have any special approval permissions
    595595            $allowed_projects = array();
    596             if ( ! $can_approve_for_all && $this->roles_adapter->is_approver_for_locale( $user_id, $locale ) ) {
     596            if ( ! $can_approve_for_all && $role = $this->roles_adapter->is_approver_for_locale( $user_id, $locale ) ) {
    597597                $allowed_projects = $this->roles_adapter->get_project_id_access_list( $user_id, $locale, true );
    598598
    599599                // Check to see if they can approve for all projects in this locale.
    600                 if ( in_array( 'all', $allowed_projects ) ) {
     600                if ( Rosetta_Roles::LOCALE_MANAGER_ROLE === $role || in_array( 'all', $allowed_projects ) ) {
    601601                    $can_approve_for_all = true;
    602602                    $allowed_projects = array();
Note: See TracChangeset for help on using the changeset viewer.