Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Commit da0d928

Browse files
committed
allow custom ajax actions by default
1 parent c06277a commit da0d928

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

authMgrPlus/plugin.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Auth Manager Plus
44
Plugin URI: https://github.com/joshp23/YOURLS-AuthMgrPlus
55
Description: Role Based Access Controlls with seperated user data for authenticated users
6-
Version: 2.2.1
6+
Version: 2.2.2
77
Author: Josh Panter, nicwaller, Ian Barber <[email protected]>
88
Author URI: https://unfettered.net
99
*/
@@ -100,14 +100,13 @@ function amp_intercept_admin() {
100100
yourls_apply_filter( 'amp_restricted_ajax_actions', $restricted_actions );
101101

102102
$action_keyword = $_REQUEST['action'];
103-
$cap_needed = $action_capability_map[$action_keyword];
104103

105104
// Check the action against those boundaries
106105
if ( in_array( $action_keyword, $restricted_actions) ) {
107106
$keyword = $_REQUEST['keyword'];
108-
$do = amp_manage_keyword( $keyword, $cap_needed );
107+
$do = amp_manage_keyword( $keyword, $action_capability_map[$action_keyword] );
109108
} else {
110-
$do = amp_have_capability( $cap_needed );
109+
$do = amp_have_capability( $action_capability_map[$action_keyword] );
111110
}
112111

113112
if ( $do !== true ) {

0 commit comments

Comments
 (0)