Changeset 12164
- Timestamp:
- 10/31/2022 04:26:54 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin-committers.php
r11373 r12164 139 139 140 140 $plugin_slug = $request['plugin_slug']; 141 $plugin_post = Plugin_Directory::get_plugin_post( $plugin_slug ); 141 142 142 143 // Prevent a committer removing themselves, if they're the only committer. … … 146 147 return new WP_Error( 'failed', __( 'Sorry, you must have at least one committer.', 'wporg-plugins' ) ); 147 148 } 149 } 150 151 // Prevent a non-admin removing a committer who is the owner of the plugin. 152 if ( ! current_user_can( 'plugin_approve' ) && $user->ID == $plugin_post->post_author ) { 153 return new WP_Error( 'failed', __( 'Sorry, you cannot remove the owner of the plugin as a committer.', 'wporg-plugins' ) ); 148 154 } 149 155
Note: See TracChangeset
for help on using the changeset viewer.