@@ -2592,6 +2592,15 @@ function apbct_settings__sync($direct_call = false)
25922592
25932593 global $ apbct ;
25942594
2595+ if (!current_user_can ('activate_plugins ' )) {
2596+ $ out = array (
2597+ 'success ' => false ,
2598+ 'reload ' => false ,
2599+ 'message ' => __ ('You do not have sufficient permissions to access this page. ' , 'cleantalk-spam-protect ' ),
2600+ );
2601+ die (json_encode ($ out ));
2602+ }
2603+
25952604 //Clearing all errors
25962605 $ apbct ->errorDeleteAll (true );
25972606
@@ -2720,6 +2729,15 @@ function apbct_settings__get_key_auto($direct_call = false)
27202729
27212730 global $ apbct ;
27222731
2732+ if (!current_user_can ('activate_plugins ' )) {
2733+ $ out = array (
2734+ 'success ' => false ,
2735+ 'message ' => __ ('You do not have sufficient permissions to access this page. ' , 'cleantalk-spam-protect ' ),
2736+
2737+ );
2738+ die (json_encode ($ out ));
2739+ }
2740+
27232741 $ website = parse_url (get_option ('home ' ), PHP_URL_HOST ) . parse_url (get_option ('home ' ), PHP_URL_PATH );
27242742 $ platform = 'wordpress ' ;
27252743 $ user_ip = Helper::ipGet ('real ' , false );
@@ -2983,6 +3001,14 @@ function apbct_settings__get__long_description()
29833001 global $ apbct ;
29843002 AJAXService::checkAdminNonce ();
29853003
3004+ if (!current_user_can ('activate_plugins ' )) {
3005+ $ out = array (
3006+ 'success ' => false ,
3007+ 'message ' => __ ('You do not have sufficient permissions to access this page. ' , 'cleantalk-spam-protect ' ),
3008+ );
3009+ die (json_encode ($ out ));
3010+ }
3011+
29863012 $ setting_id = TT ::toString (Post::get ('setting_id ' , null , 'word ' ));
29873013
29883014 $ link_exclusion_by_form_signs = LinkConstructor::buildCleanTalkLink (
@@ -3150,6 +3176,15 @@ function apbct_settings__check_renew_banner()
31503176
31513177 AJAXService::checkAdminNonce ();
31523178
3179+ if (!current_user_can ('activate_plugins ' )) {
3180+ $ out = array (
3181+ 'success ' => false ,
3182+ 'close_renew_banner ' => false ,
3183+ 'message ' => __ ('You do not have sufficient permissions to access this page. ' , 'cleantalk-spam-protect ' ),
3184+ );
3185+ die (json_encode ($ out ));
3186+ }
3187+
31533188 die (
31543189 json_encode (
31553190 array ('close_renew_banner ' => ($ apbct ->data ['notice_trial ' ] == 0 && $ apbct ->data ['notice_renew ' ] == 0 ) ? true : false )
0 commit comments