Making WordPress.org

Changeset 13933


Ignore:
Timestamp:
07/29/2024 06:39:59 AM (6 months ago)
Author:
dd32
Message:

Plugin Directory: Allow plugin reviewers to force approve releases.

This was broken in [13931].

See #7704.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-release-confirmation.php

    r13931 r13933  
    290290
    291291        // Plugin reviewers can always access the release management functionality, in wp-admin.
    292         if ( current_user_can( 'plugin_review' ) && is_admin() ) {
     292        if ( current_user_can( 'plugin_review' ) && ( is_admin() || wp_is_serving_rest_request() ) ) {
    293293            return true;
    294294        }
    295295
    296296        // Must have an access token..
    297         if ( ! is_user_logged_in() || empty( $_COOKIE[ self::COOKIE ] ) ) {
     297        if ( empty( $_COOKIE[ self::COOKIE ] ) ) {
    298298            return false;
    299299        }
Note: See TracChangeset for help on using the changeset viewer.