Skip to content

Commit 2583cb9

Browse files
PSMEL-212 - Unauthorized
If user can MANAGE_POSTMAN_CAPABILITY_NAME, user can ajax request as well
1 parent d4d3e7b commit 2583cb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Postman/Postman-Connectivity-Test/PostmanConnectivityTestController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ function runSmtpTest() {
278278

279279
check_admin_referer('post-smtp', 'security');
280280

281-
if( !current_user_can( 'edit_plugins' ) ) {
281+
if( !current_user_can( Postman::MANAGE_POSTMAN_CAPABILITY_NAME ) ) {
282282
wp_send_json_error(
283283
array(
284284
'Message' => 'Unauthorized.'
@@ -317,7 +317,7 @@ function runSmtpsTest() {
317317

318318
check_admin_referer('post-smtp', 'security');
319319

320-
if( !current_user_can( 'edit_plugins' ) ) {
320+
if( !current_user_can( Postman::MANAGE_POSTMAN_CAPABILITY_NAME ) ) {
321321
wp_send_json_error(
322322
array(
323323
'Message' => 'Unauthorized.'

0 commit comments

Comments
 (0)