Making WordPress.org


Ignore:
Timestamp:
04/05/2022 05:14:18 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Introduce specific capabilities for various actions, rather than just using "edit access".

See #5654.

File:
1 edited

Legend:

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

    r11297 r11744  
    3030                $plugin = Plugin_Directory::get_plugin_post( $request['plugin_slug'] );
    3131
    32                 return current_user_can( 'plugin_admin_edit', $plugin ) && 'publish' === $plugin->post_status;
     32                return current_user_can( 'plugin_manage_releases', $plugin );
    3333            },
    3434        ] );
     
    5050                return (
    5151                    Release_Confirmation_Shortcode::can_access() &&
    52                     current_user_can( 'plugin_admin_edit', $plugin ) &&
    53                     'publish' === $plugin->post_status
     52                    current_user_can( 'plugin_manage_releases', $plugin )
    5453                );
    5554            },
Note: See TracChangeset for help on using the changeset viewer.