Advanced Access Manager - Version 6.4.0

Version Description

  • Fixed Bug: URI Access: Changing existing URI rule puts it in the end of the list https://github.com/aamplugin/advanced-access-manager/issues/74
  • Fixed Bug: URI Access: Incorrect handling of the inherited rules https://github.com/aamplugin/advanced-access-manager/issues/77
  • Fixed Bug: CSS issue with add-on button when it is inactive https://github.com/aamplugin/advanced-access-manager/issues/78
  • Fixed Bug: IP Check add-on: Failure to delete rules https://github.com/aamplugin/advanced-access-manager/issues/65
  • Fixed Bug: IP Check add-on: Incorrectly evaluated multiple rules https://github.com/aamplugin/advanced-access-manager/issues/66
  • Fixed Bug: Plus Package add-on: Warning: Invalid argument supplied for foreach() in ...ContentHooks.php on line 800 https://github.com/aamplugin/advanced-access-manager/issues/73
  • Fixed Bug: Plus Package add-on: Terms & Taxonomies settings take effect when Post & Terms service is off https://github.com/aamplugin/advanced-access-manager/issues/69
  • Added New: Plus Package add-on: Support for the "ADD NEW" term access option to access policy https://github.com/aamplugin/advanced-access-manager/issues/57
  • Added New: Plus Package add-on: Wildcard support for the API Routes in access policies https://github.com/aamplugin/advanced-access-manager/issues/56
  • Added New: Plus Package add-on: More granular access to taxonomy/term visibility https://github.com/aamplugin/advanced-access-manager/issues/54
  • Added New: IP Check add-on: Integration with Access Policy https://github.com/aamplugin/advanced-access-manager/issues/68
  • Added New: The ability to define "Access Denied Redirect" rules with access policy https://github.com/aamplugin/advanced-access-manager/issues/61
  • Added New: The ability to define "Login Redirect" rules with access policy https://github.com/aamplugin/advanced-access-manager/issues/62
  • Added New: The ability to define "Logout Redirect" rules with access policy https://github.com/aamplugin/advanced-access-manager/issues/63
  • Added New: The ability to define "404 Redirect" rules with access policy https://github.com/aamplugin/advanced-access-manager/issues/64
  • Added New: Allow the ability to programmatically get AAM service https://github.com/aamplugin/advanced-access-manager/issues/71
  • Added New: The ability to change role's slug https://github.com/aamplugin/advanced-access-manager/issues/72
  • Added New: The ability to issue refreshable JWT token through RESTful API https://github.com/aamplugin/advanced-access-manager/issues/16
  • Added New: The "Manage Access" toolbar menu item https://github.com/aamplugin/advanced-access-manager/issues/26
  • Added New: AAM WP-CLI add-on. Allows to install premium AAM add-ons and access policies. Check for more details
  • Changed: Use slugs instead of post/term IDs during policy generation https://github.com/aamplugin/advanced-access-manager/issues/80
  • Changed: Policy Generate button does not have tooltip https://github.com/aamplugin/advanced-access-manager/issues/79
  • Changed: Access Policy Generator split across services https://github.com/aamplugin/advanced-access-manager/issues/76
  • Changed: Enhanced AAM API https://github.com/aamplugin/advanced-access-manager/issues/75
  • Changed: The 404 (Not Found) Redirect now is allowed to be customized per user and role https://github.com/aamplugin/advanced-access-manager/issues/64
Download this release

Release Info

Developer vasyltech
Plugin Icon 128x128 Advanced Access Manager
Version 6.4.0
Comparing to
See all releases

Code changes from version 6.3.3 to 6.4.0

Files changed (43) hide show
  1. aam.php +2 -2
  2. application/Backend/Feature/Main/404Redirect.php +21 -15
  3. application/Backend/Feature/Main/Uri.php +33 -15
  4. application/Backend/Feature/Subject/Role.php +10 -3
  5. application/Backend/tmpl/page/addon-panel.php +3 -2
  6. application/Backend/tmpl/page/subject-panel-advanced.php +14 -2
  7. application/Backend/tmpl/partial/access-policy-action.php +9 -2
  8. application/Backend/tmpl/service/404redirect.php +55 -44
  9. application/Core/Contract/ServiceTrait.php +23 -3
  10. application/Core/Gateway.php +1 -2
  11. application/Core/Object.php +31 -0
  12. application/Core/Object/LoginRedirect.php +13 -2
  13. application/Core/Object/LogoutRedirect.php +13 -2
  14. application/Core/Object/NotFoundRedirect.php +64 -0
  15. application/Core/Object/Redirect.php +10 -1
  16. application/Core/Object/Route.php +15 -3
  17. application/Core/Object/Uri.php +30 -3
  18. application/Core/Policy/Generator.php +62 -367
  19. application/Core/Policy/Manager.php +15 -4
  20. application/Core/Subject/Role.php +30 -5
  21. application/Migration/2019_12_19-base.php +11 -2
  22. application/Migration/2020_02_01-base.php +11 -1
  23. application/Migration/2020_03_02-base.php +67 -0
  24. application/Service/AccessPolicy.php +124 -5
  25. application/Service/AdminMenu.php +52 -4
  26. application/Service/Capability.php +0 -2
  27. application/Service/Content.php +259 -2
  28. application/Service/Core.php +46 -2
  29. application/Service/DeniedRedirect.php +93 -11
  30. application/Service/Jwt.php +42 -4
  31. application/Service/LoginRedirect.php +41 -4
  32. application/Service/LogoutRedirect.php +36 -2
  33. application/Service/Metabox.php +64 -8
  34. application/Service/NotFoundRedirect.php +55 -7
  35. application/Service/Route.php +60 -5
  36. application/Service/SecureLogin.php +37 -12
  37. application/Service/Toolbar.php +40 -4
  38. application/Service/Uri.php +38 -2
  39. application/Service/UserLevelFilter.php +20 -4
  40. lang/advanced-access-manager-en_US.mo +0 -0
  41. lang/advanced-access-manager-en_US.po +329 -306
  42. media/js/aam.js +55 -7
  43. readme.txt +28 -1
aam.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Plugin Name: Advanced Access Manager
5
  * Description: Collection of features to manage your WordPress website authentication, authorization and monitoring
6
- * Version: 6.3.3
7
  * Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  * Author URI: https://vasyltech.com
9
  * Text Domain: advanced-access-manager
@@ -264,7 +264,7 @@ if (defined('ABSPATH')) {
264
  //define few common constants
265
  define('AAM_MEDIA', plugins_url('/media', __FILE__));
266
  define('AAM_KEY', 'advanced-access-manager');
267
- define('AAM_VERSION', '6.3.3');
268
  define('AAM_BASEDIR', __DIR__);
269
 
270
  //load vendor
3
  /**
4
  * Plugin Name: Advanced Access Manager
5
  * Description: Collection of features to manage your WordPress website authentication, authorization and monitoring
6
+ * Version: 6.4.0
7
  * Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  * Author URI: https://vasyltech.com
9
  * Text Domain: advanced-access-manager
264
  //define few common constants
265
  define('AAM_MEDIA', plugins_url('/media', __FILE__));
266
  define('AAM_KEY', 'advanced-access-manager');
267
+ define('AAM_VERSION', '6.4.0');
268
  define('AAM_BASEDIR', __DIR__);
269
 
270
  //load vendor
application/Backend/Feature/Main/404Redirect.php CHANGED
@@ -5,13 +5,15 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * Backend 404 redirect manager
14
  *
 
 
 
 
15
  * @package AAM
16
  * @version 6.0.0
17
  */
@@ -19,8 +21,6 @@ class AAM_Backend_Feature_Main_404Redirect
19
  extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAware
20
  {
21
 
22
- use AAM_Core_Contract_RequestTrait;
23
-
24
  /**
25
  * Default access capability to the service
26
  *
@@ -28,6 +28,13 @@ class AAM_Backend_Feature_Main_404Redirect
28
  */
29
  const ACCESS_CAPABILITY = 'aam_manage_404_redirect';
30
 
 
 
 
 
 
 
 
31
  /**
32
  * HTML template to render
33
  *
@@ -36,23 +43,22 @@ class AAM_Backend_Feature_Main_404Redirect
36
  const TEMPLATE = 'service/404redirect.php';
37
 
38
  /**
39
- * Save 404 redirect options
 
 
 
40
  *
41
- * @return string
42
  *
43
  * @access public
44
- * @version 6.0.0
45
  */
46
- public function save()
47
  {
48
- $param = AAM_Core_Request::post('param');
49
- $value = $this->getFromPost('value');
50
-
51
- $result = AAM_Core_Config::set($param, $value);
52
 
53
- return wp_json_encode(
54
- array('status' => $result ? 'success' : 'failure')
55
- );
56
  }
57
 
58
  /**
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
11
  * Backend 404 redirect manager
12
  *
13
+ * @since 6.4.0 Changed the way 404 settings are stored
14
+ * https://github.com/aamplugin/advanced-access-manager/issues/64
15
+ * @since 6.0.0 Initial implementation of the method
16
+ *
17
  * @package AAM
18
  * @version 6.0.0
19
  */
21
  extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAware
22
  {
23
 
 
 
24
  /**
25
  * Default access capability to the service
26
  *
28
  */
29
  const ACCESS_CAPABILITY = 'aam_manage_404_redirect';
30
 
31
+ /**
32
+ * Type of AAM core object
33
+ *
34
+ * @version 6.4.0
35
+ */
36
+ const OBJECT_TYPE = AAM_Core_Object_NotFoundRedirect::OBJECT_TYPE;
37
+
38
  /**
39
  * HTML template to render
40
  *
43
  const TEMPLATE = 'service/404redirect.php';
44
 
45
  /**
46
+ * Get option value
47
+ *
48
+ * @param string $name
49
+ * @param mixed $default
50
  *
51
+ * @return mixed
52
  *
53
  * @access public
54
+ * @version 6.4.0
55
  */
56
+ public function getOption($name, $default = null)
57
  {
58
+ $object = $this->getSubject()->getObject(self::OBJECT_TYPE);
59
+ $option = $object->getOption();
 
 
60
 
61
+ return (!empty($option[$name]) ? $option[$name] : $default);
 
 
62
  }
63
 
64
  /**
application/Backend/Feature/Main/Uri.php CHANGED
@@ -10,11 +10,12 @@
10
  /**
11
  * URI service
12
  *
 
13
  * @since 6.3.0 Fixed bug with incorrectly handled record editing
14
  * @since 6.0.0 Initial implementation of the class
15
  *
16
  * @package AAM
17
- * @version 6.3.0
18
  */
19
  class AAM_Backend_Feature_Main_Uri
20
  extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAware
@@ -48,13 +49,16 @@ class AAM_Backend_Feature_Main_Uri
48
  *
49
  * @return string
50
  *
 
 
 
51
  * @access public
52
  * @version 6.0.0
53
  */
54
  public function getTable()
55
  {
56
- $subject = AAM_Backend_Subject::getInstance();
57
- $rules = $subject->getObject(self::OBJECT_TYPE)->getOption();
58
 
59
  $response = array(
60
  'recordsTotal' => count($rules),
@@ -64,12 +68,13 @@ class AAM_Backend_Feature_Main_Uri
64
  );
65
 
66
  foreach ($rules as $uri => $rule) {
 
67
  $response['data'][] = array(
68
  $uri,
69
  $rule['type'],
70
  $rule['action'],
71
  isset($rule['code']) ? $rule['code'] : 307,
72
- 'edit,delete'
73
  );
74
  }
75
 
@@ -81,33 +86,46 @@ class AAM_Backend_Feature_Main_Uri
81
  *
82
  * @return string
83
  *
84
- * @since 6.3.0 Fixed bug https://github.com/aamplugin/advanced-access-manager/issues/35
 
85
  * @since 6.0.0 Initial implementation of the method
86
  *
87
  * @access public
88
- * @version 6.3.0
89
  */
90
  public function save()
91
  {
92
  $uri = str_replace(site_url(), '', $this->getFromPost('uri'));
93
  $edited = $this->getFromPost('edited_uri');
94
- $type = $this->getFromPost('type');
95
- $value = $this->getFromPost('value');
96
- $code = $this->getFromPost('code');
 
 
 
 
97
 
98
  $object = AAM_Backend_Subject::getInstance()->getObject(self::OBJECT_TYPE);
99
 
100
  // If $edited is not empty, then we actually editing existing record. In this
101
  // case let's delete it and insert new record after that
102
  if (!empty($edited) && $object->has($edited)) {
103
- $object->delete($edited);
 
 
 
 
 
 
 
 
 
 
 
 
104
  }
105
 
106
- $result = $object->updateOptionItem($uri, array(
107
- 'type' => $type,
108
- 'action' => $value,
109
- 'code' => $code
110
- ))->save();
111
 
112
  return wp_json_encode(array('status' => ($result ? 'success' : 'failure')));
113
  }
10
  /**
11
  * URI service
12
  *
13
+ * @since 6.4.0 Improved UI functionality with better rules handling
14
  * @since 6.3.0 Fixed bug with incorrectly handled record editing
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
+ * @version 6.4.0
19
  */
20
  class AAM_Backend_Feature_Main_Uri
21
  extends AAM_Backend_Feature_Abstract implements AAM_Backend_Feature_ISubjectAware
49
  *
50
  * @return string
51
  *
52
+ * @since 6.4.0 Do not allow to edit/delete inherited rules
53
+ * @since 6.0.0 Initial implementation of the method
54
+ *
55
  * @access public
56
  * @version 6.0.0
57
  */
58
  public function getTable()
59
  {
60
+ $object = AAM_Backend_Subject::getInstance()->getObject(self::OBJECT_TYPE);
61
+ $rules = $object->getOption();
62
 
63
  $response = array(
64
  'recordsTotal' => count($rules),
68
  );
69
 
70
  foreach ($rules as $uri => $rule) {
71
+ $prefix = ($object->has($uri) ? '' : 'no-');
72
  $response['data'][] = array(
73
  $uri,
74
  $rule['type'],
75
  $rule['action'],
76
  isset($rule['code']) ? $rule['code'] : 307,
77
+ "{$prefix}edit,{$prefix}delete"
78
  );
79
  }
80
 
86
  *
87
  * @return string
88
  *
89
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/77
90
+ * @since 6.3.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/35
91
  * @since 6.0.0 Initial implementation of the method
92
  *
93
  * @access public
94
+ * @version 6.4.0
95
  */
96
  public function save()
97
  {
98
  $uri = str_replace(site_url(), '', $this->getFromPost('uri'));
99
  $edited = $this->getFromPost('edited_uri');
100
+
101
+ // Compile rule
102
+ $rule = array(
103
+ 'type' => $this->getFromPost('type'),
104
+ 'action' => $this->getFromPost('value'),
105
+ 'code' => $this->getFromPost('code')
106
+ );
107
 
108
  $object = AAM_Backend_Subject::getInstance()->getObject(self::OBJECT_TYPE);
109
 
110
  // If $edited is not empty, then we actually editing existing record. In this
111
  // case let's delete it and insert new record after that
112
  if (!empty($edited) && $object->has($edited)) {
113
+ $modified = array();
114
+
115
+ foreach($object->getExplicitOption() as $stored_uri => $data) {
116
+ if ($stored_uri === $edited) {
117
+ $modified[$uri] = $rule; // Replace & preserve the order
118
+ } else {
119
+ $modified[$stored_uri] = $data;
120
+ }
121
+ }
122
+
123
+ $object->setExplicitOption($modified);
124
+ } else { // Adding new rule
125
+ $object->updateOptionItem($uri, $rule);
126
  }
127
 
128
+ $result = $object->save();
 
 
 
 
129
 
130
  return wp_json_encode(array('status' => ($result ? 'success' : 'failure')));
131
  }
application/Backend/Feature/Subject/Role.php CHANGED
@@ -10,11 +10,12 @@
10
  /**
11
  * Role view manager
12
  *
 
13
  * @since 6.1.0 Fixed bug with role creation process that caused PHP warning
14
  * @since 6.0.0 Initial implementation of the class
15
  *
16
  * @package AAM
17
- * @version 6.1.0
18
  */
19
  class AAM_Backend_Feature_Subject_Role
20
  {
@@ -257,15 +258,21 @@ class AAM_Backend_Feature_Subject_Role
257
  *
258
  * @return array
259
  *
 
 
 
260
  * @access private
261
- * @version 6.0.0
262
  */
263
  private function _edit()
264
  {
265
  if (current_user_can('aam_edit_roles')) {
266
  $role = AAM_Backend_Subject::getInstance();
267
 
268
- $role->update(esc_js(trim(filter_input(INPUT_POST, 'name'))));
 
 
 
269
 
270
  do_action('aam_post_update_role_action', $role->getSubject());
271
 
10
  /**
11
  * Role view manager
12
  *
13
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/72
14
  * @since 6.1.0 Fixed bug with role creation process that caused PHP warning
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
+ * @version 6.4.0
19
  */
20
  class AAM_Backend_Feature_Subject_Role
21
  {
258
  *
259
  * @return array
260
  *
261
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/72
262
+ * @since 6.0.0 Initial implementation of the method
263
+ *
264
  * @access private
265
+ * @version 6.4.0
266
  */
267
  private function _edit()
268
  {
269
  if (current_user_can('aam_edit_roles')) {
270
  $role = AAM_Backend_Subject::getInstance();
271
 
272
+ $role->update(
273
+ esc_js(trim(filter_input(INPUT_POST, 'name'))),
274
+ sanitize_key(filter_input(INPUT_POST, 'slug'))
275
+ );
276
 
277
  do_action('aam_post_update_role_action', $role->getSubject());
278
 
application/Backend/tmpl/page/addon-panel.php CHANGED
@@ -1,10 +1,11 @@
1
  <?php
2
  /**
 
3
  * @since 6.2.0 Removed expiration date for license to avoid confusion
4
  * @since 6.0.5 Fixed typo in the license expiration property. Enriched plugin' status display
5
  * @since 6.0.0 Initial implementation of the template
6
  *
7
- * @version 6.2.0
8
  * */
9
  ?>
10
 
@@ -61,7 +62,7 @@
61
  <?php } elseif (!empty($product['isActive'])) { ?>
62
  <a href="#" class="btn btn-sm btn-success btn-block disabled"><i class="icon-check"></i> <?php echo __('Active', AAM_KEY); ?></a>
63
  <?php } elseif (!empty($product['version'])) { ?>
64
- <a href="#" class="btn btn-sm btn-default btn-block disabled"><i class="icon-info-circled"></i> <?php echo __('Inactive', AAM_KEY); ?></a>
65
  <?php } else { ?>
66
  <a href="<?php echo $product['url']; ?>" target="_blank" class="btn btn-sm btn-primary btn-block"><i class="icon-link"></i> <?php echo __('Read More', AAM_KEY); ?></a>
67
  <?php } ?>
1
  <?php
2
  /**
3
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/78
4
  * @since 6.2.0 Removed expiration date for license to avoid confusion
5
  * @since 6.0.5 Fixed typo in the license expiration property. Enriched plugin' status display
6
  * @since 6.0.0 Initial implementation of the template
7
  *
8
+ * @version 6.4.0
9
  * */
10
  ?>
11
 
62
  <?php } elseif (!empty($product['isActive'])) { ?>
63
  <a href="#" class="btn btn-sm btn-success btn-block disabled"><i class="icon-check"></i> <?php echo __('Active', AAM_KEY); ?></a>
64
  <?php } elseif (!empty($product['version'])) { ?>
65
+ <a href="#" class="btn btn-sm btn-info btn-block disabled"><i class="icon-info-circled"></i> <?php echo __('Inactive', AAM_KEY); ?></a>
66
  <?php } else { ?>
67
  <a href="<?php echo $product['url']; ?>" target="_blank" class="btn btn-sm btn-primary btn-block"><i class="icon-link"></i> <?php echo __('Read More', AAM_KEY); ?></a>
68
  <?php } ?>
application/Backend/tmpl/page/subject-panel-advanced.php CHANGED
@@ -1,4 +1,11 @@
1
- <?php /** @version 6.0.0 */ ?>
 
 
 
 
 
 
 
2
 
3
  <?php if (defined('AAM_KEY')) { ?>
4
  <div class="modal fade" id="add-role-modal" tabindex="-1" role="dialog">
@@ -32,9 +39,14 @@
32
  </div>
33
  <div class="modal-body">
34
  <div class="form-group">
35
- <label for="new-role-name"><?php echo __('Role Name', AAM_KEY); ?></label>
36
  <input type="text" class="form-control" id="edit-role-name" placeholder="<?php echo __('Enter Role Name', AAM_KEY); ?>" name="name" />
37
  </div>
 
 
 
 
 
38
  <?php do_action('aam_edit_role_ui_action'); ?>
39
  </div>
40
  <div class="modal-footer">
1
+ <?php
2
+ /**
3
+ * @since 6.4.0 Added the ability to edit role's slug
4
+ * @since 6.0.0 Initial implementation of the template
5
+ *
6
+ * @version 6.4.0
7
+ * */
8
+ ?>
9
 
10
  <?php if (defined('AAM_KEY')) { ?>
11
  <div class="modal fade" id="add-role-modal" tabindex="-1" role="dialog">
39
  </div>
40
  <div class="modal-body">
41
  <div class="form-group">
42
+ <label for="edit-role-name"><?php echo __('Role Name', AAM_KEY); ?></label>
43
  <input type="text" class="form-control" id="edit-role-name" placeholder="<?php echo __('Enter Role Name', AAM_KEY); ?>" name="name" />
44
  </div>
45
+ <div class="form-group">
46
+ <label for="new-role-slug"><?php echo __('Role Slug', AAM_KEY); ?></label>
47
+ <input type="text" class="form-control" id="edit-role-slug" name="slug" />
48
+ <small class="text-muted hint"><?php echo __('Can be changed if no users are assigned to role', AAM_KEY); ?></small>
49
+ </div>
50
  <?php do_action('aam_edit_role_ui_action'); ?>
51
  </div>
52
  <div class="modal-footer">
application/Backend/tmpl/partial/access-policy-action.php CHANGED
@@ -1,8 +1,15 @@
1
- <?php /** @version 6.3.0 */ ?>
 
 
 
 
 
 
 
2
 
3
  <?php if (defined('AAM_KEY')) { ?>
4
  <div class="dropdown">
5
- <a href="#" id="policy-generator" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="icon-file-code"></i></a>
6
  <ul class="dropdown-menu">
7
  <li><a href="#" id="generate-access-policy"><?php echo __('Download as File', AAM_KEY); ?></a></li>
8
  <li><a href="#" id="create-access-policy"><?php echo __('Create New Policy', AAM_KEY); ?></a></li>
1
+ <?php
2
+ /**
3
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/79
4
+ * @since 6.3.0 Initial implementation of the template
5
+ *
6
+ * @version 6.4.0
7
+ * */
8
+ ?>
9
 
10
  <?php if (defined('AAM_KEY')) { ?>
11
  <div class="dropdown">
12
+ <a href="#" id="policy-generator" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-placement="right" title="<?php echo __('Generate Access Policy', AAM_KEY); ?>"><i class="icon-file-code"></i></a>
13
  <ul class="dropdown-menu">
14
  <li><a href="#" id="generate-access-policy"><?php echo __('Download as File', AAM_KEY); ?></a></li>
15
  <li><a href="#" id="create-access-policy"><?php echo __('Create New Policy', AAM_KEY); ?></a></li>
application/Backend/tmpl/service/404redirect.php CHANGED
@@ -1,66 +1,77 @@
1
- <?php /** @version 6.0.0 */ ?>
 
 
 
 
 
 
 
2
 
3
  <?php if (defined('AAM_KEY')) { ?>
4
  <div class="aam-feature" id="404redirect-content">
5
- <?php if ($this->getSubject()->isDefault()) { ?>
6
- <div class="row">
7
- <div class="col-xs-12">
 
 
 
 
8
  <p class="aam-info">
9
- <?php echo AAM_Backend_View_Helper::preparePhrase('Setup [default] 404 redirect for all none-existing pages.', 'strong'); ?>
10
  </p>
 
 
 
 
11
  </div>
12
  </div>
13
- <?php } ?>
14
 
15
  <div class="row">
16
  <div class="col-xs-12">
17
- <?php if ($this->getSubject()->isDefault()) { ?>
18
- <?php $type = AAM_Core_Config::get('frontend.404redirect.type', 'default'); ?>
19
 
20
- <div class="radio">
21
- <input type="radio" name="frontend.404redirect.type" id="frontend-404redirect-default" value="default" data-action="none" <?php echo ($type === 'default' ? ' checked' : ''); ?> />
22
- <label for="frontend-404redirect-default"><?php echo AAM_Backend_View_Helper::preparePhrase('Default WordPress 404 handler', 'small'); ?></label>
23
- </div>
24
- <div class="radio">
25
- <input type="radio" name="frontend.404redirect.type" id="frontend-404redirect-page" data-action="#404redirect-page-action" value="page" <?php echo ($type === 'page' ? ' checked' : ''); ?> />
26
- <label for="frontend-404redirect-page"><?php echo AAM_Backend_View_Helper::preparePhrase('Redirected to existing page [(select from the drop-down)]', 'small'); ?></label>
27
- </div>
28
- <div class="radio">
29
- <input type="radio" name="frontend.404redirect.type" id="frontend-404redirect-url" data-action="#404redirect-url-action" value="url" <?php echo ($type === 'url' ? ' checked' : ''); ?> />
30
- <label for="frontend-404redirect-url"><?php echo AAM_Backend_View_Helper::preparePhrase('Redirected to the URL [(enter valid URL starting from http or https)]', 'small'); ?></label>
31
- </div>
32
- <div class="radio">
33
- <input type="radio" name="frontend.404redirect.type" id="frontend-404redirect-callback" data-action="#404redirect-callback-action" value="callback" <?php echo ($type === 'callback' ? ' checked' : ''); ?> />
34
- <label for="frontend-404redirect-callback"><?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Trigger PHP callback function [(valid %sPHP callback%s is required)]', 'small'), '<a href="https://php.net/manual/en/language.types.callable.php" target="_blank">', '</a>'); ?></label>
35
- </div>
36
 
37
- <div class="form-group aam-404redirect-action" id="404redirect-page-action" style="display: <?php echo ($type === 'page' ? 'block' : 'none'); ?>;">
38
- <label for="frontend-page"><?php echo __('Existing Page', AAM_KEY); ?></label>
39
- <?php
40
  wp_dropdown_pages(array(
41
  'depth' => 99,
42
- 'selected' => AAM_Core_Config::get('frontend.404redirect.page'),
43
  'echo' => 1,
44
- 'name' => 'frontend.404redirect.page',
45
- 'id' => '404-redirect-page', // string
46
- 'class' => 'form-control', // string
47
- 'show_option_none' => __('-- Select Page --', AAM_KEY) // string
48
  ));
49
  ?>
50
- </div>
51
 
52
- <div class="form-group aam-404redirect-action" id="404redirect-url-action" style="display: <?php echo ($type === 'url' ? 'block' : 'none'); ?>;">
53
- <label for="frontend-url"><?php echo __('The URL', AAM_KEY); ?></label>
54
- <input type="text" class="form-control" name="frontend.404redirect.url" placeholder="https://" value="<?php echo AAM_Core_Config::get('frontend.404redirect.url'); ?>" />
55
- </div>
56
 
57
- <div class="form-group aam-404redirect-action" id="404redirect-callback-action" style="display: <?php echo ($type === 'callback' ? 'block' : 'none'); ?>;">
58
- <label for="frontend-url"><?php echo __('PHP Callback Function', AAM_KEY); ?></label>
59
- <input type="text" class="form-control" placeholder="Enter valid callback" name="frontend.404redirect.callback" value="<?php echo AAM_Core_Config::get('frontend.404redirect.callback'); ?>" />
60
- </div>
61
- <?php } else { ?>
62
- <p class="alert alert-info text-center"><?php echo AAM_Backend_View_Helper::preparePhrase('You cannot setup 404 redirect for specific user, role or visitors. Switch to [Manage Default Access] and define default 404 redirect for everybody.', 'strong'); ?></p>
63
- <?php } ?>
64
  </div>
65
  </div>
66
  </div>
1
+ <?php
2
+ /**
3
+ * @since 6.4.0 Allowing to define 404 for any user or role
4
+ * @since 6.0.0 Initial implementation of the templates
5
+ *
6
+ * @version 6.4.0
7
+ * */
8
+ ?>
9
 
10
  <?php if (defined('AAM_KEY')) { ?>
11
  <div class="aam-feature" id="404redirect-content">
12
+ <div class="row">
13
+ <div class="col-xs-12">
14
+ <?php if ($this->getSubject()->isDefault()) { ?>
15
+ <p class="aam-info">
16
+ <?php echo AAM_Backend_View_Helper::preparePhrase('Define the [default] 404 (Not Found) redirect for all the users and roles.', 'strong'); ?>
17
+ </p>
18
+ <?php } else { ?>
19
  <p class="aam-info">
20
+ <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Customize 404 (Not Found) redirect for [%s] when requested page is not found.', 'strong'), $this->getSubject()->getName()); ?>
21
  </p>
22
+ <?php } ?>
23
+ <div class="aam-overwrite" id="aam-404redirect-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>">
24
+ <span><i class="icon-check"></i> <?php echo __('Settings are customized', AAM_KEY); ?></span>
25
+ <span><a href="#" id="404redirect-reset" class="btn btn-xs btn-primary"><?php echo __('Reset to default', AAM_KEY); ?></a></span>
26
  </div>
27
  </div>
28
+ </div>
29
 
30
  <div class="row">
31
  <div class="col-xs-12">
32
+ <?php $type = $this->getOption('404.redirect.type', 'default'); ?>
 
33
 
34
+ <div class="radio">
35
+ <input type="radio" name="404.redirect.type" id="404redirect-default" data-action="#default-redirect-action" value="default" <?php echo ($type === 'default' ? ' checked' : ''); ?> />
36
+ <label for="404redirect-default"><?php echo __('WordPress default behavior', AAM_KEY); ?></label>
37
+ </div>
38
+ <div class="radio">
39
+ <input type="radio" name="404.redirect.type" id="404redirect-page" data-action="#page-404redirect-action" value="page" <?php echo ($type === 'page' ? ' checked' : ''); ?> />
40
+ <label for="404redirect-page"><?php echo AAM_Backend_View_Helper::preparePhrase('Redirected to existing page [(select from the drop-down)]', 'small'); ?></label>
41
+ </div>
42
+ <div class="radio">
43
+ <input type="radio" name="404.redirect.type" id="404redirect-url" data-action="#url-404redirect-action" value="url" <?php echo ($type === 'url' ? ' checked' : ''); ?> />
44
+ <label for="404redirect-url"><?php echo AAM_Backend_View_Helper::preparePhrase('Redirected to the local URL [(enter full URL starting from http or https)]', 'small'); ?></label>
45
+ </div>
46
+ <div class="radio">
47
+ <input type="radio" name="404.redirect.type" id="404redirect-callback" data-action="#callback-404redirect-action" value="callback" <?php echo ($type === 'callback' ? ' checked' : ''); ?> />
48
+ <label for="404redirect-callback"><?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Trigger PHP callback function [(valid %sPHP callback%s is required)]', 'small'), '<a href="https://php.net/manual/en/language.types.callable.php" target="_blank">', '</a>'); ?></label>
49
+ </div>
50
 
51
+ <div class="form-group 404redirect-action" id="page-404redirect-action" style="display: <?php echo ($type == 'page' ? 'block' : 'none'); ?>;">
52
+ <label><?php echo __('Existing Page', AAM_KEY); ?></label>
53
+ <?php
54
  wp_dropdown_pages(array(
55
  'depth' => 99,
56
+ 'selected' => $this->getOption('404.redirect.page'),
57
  'echo' => 1,
58
+ 'name' => '404.redirect.page',
59
+ 'id' => '404redirect-page',
60
+ 'class' => 'form-control',
61
+ 'show_option_none' => __('-- Select Page --', AAM_KEY)
62
  ));
63
  ?>
64
+ </div>
65
 
66
+ <div class="form-group 404redirect-action" id="url-404redirect-action" style="display: <?php echo ($type === 'url' ? 'block' : 'none'); ?>;">
67
+ <label><?php echo __('The URL', AAM_KEY); ?></label>
68
+ <input type="text" class="form-control" name="404.redirect.url" placeholder="https://" value="<?php echo $this->getOption('404.redirect.url'); ?>" />
69
+ </div>
70
 
71
+ <div class="form-group 404-redirect-action" id="callback-404redirect-action" style="display: <?php echo ($type === 'callback' ? 'block' : 'none'); ?>;">
72
+ <label><?php echo __('PHP Callback Function', AAM_KEY); ?></label>
73
+ <input type="text" class="form-control" placeholder="Enter valid callback" name="404.redirect.callback" value="<?php echo $this->getOption('404.redirect.callback'); ?>" />
74
+ </div>
 
 
 
75
  </div>
76
  </div>
77
  </div>
application/Core/Contract/ServiceTrait.php CHANGED
@@ -5,15 +5,16 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * Reusable elements for each service
14
  *
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  trait AAM_Core_Contract_ServiceTrait
19
  {
@@ -28,6 +29,25 @@ trait AAM_Core_Contract_ServiceTrait
28
  */
29
  protected static $instance = null;
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  /**
32
  * Bootstrap the service
33
  *
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
11
  * Reusable elements for each service
12
  *
13
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/71
14
+ * @since 6.0.0 Initial implementation of the service
15
+ *
16
  * @package AAM
17
+ * @version 6.4.0
18
  */
19
  trait AAM_Core_Contract_ServiceTrait
20
  {
29
  */
30
  protected static $instance = null;
31
 
32
+ /**
33
+ * Register service to be fetched
34
+ *
35
+ * @return null|object
36
+ *
37
+ * @access protected
38
+ * @version 6.4.0
39
+ */
40
+ protected function registerService()
41
+ {
42
+ add_filter('aam_get_service_filter', function($service, $alias) {
43
+ if (empty($service) && ($alias === self::SERVICE_ALIAS)) {
44
+ $service = $this;
45
+ }
46
+
47
+ return $service;
48
+ }, 10, 2);
49
+ }
50
+
51
  /**
52
  * Bootstrap the service
53
  *
application/Core/Gateway.php CHANGED
@@ -189,8 +189,7 @@ final class AAM_Core_Gateway
189
  */
190
  public function getAccessPolicyManager(
191
  AAM_Core_Subject $subject = null, $skipInheritance = false
192
- )
193
- {
194
  if (is_null($subject)) {
195
  $subject = AAM::getUser();
196
  }
189
  */
190
  public function getAccessPolicyManager(
191
  AAM_Core_Subject $subject = null, $skipInheritance = false
192
+ ) {
 
193
  if (is_null($subject)) {
194
  $subject = AAM::getUser();
195
  }
application/Core/Object.php CHANGED
@@ -452,6 +452,24 @@ abstract class AAM_Core_Object
452
  );
453
  }
454
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
455
  /**
456
  * Reset access settings
457
  *
@@ -468,4 +486,17 @@ abstract class AAM_Core_Object
468
  );
469
  }
470
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  }
452
  );
453
  }
454
 
455
+ /**
456
+ * Store access settings
457
+ *
458
+ * Facadę that combines explicit options update and persisting them in DB
459
+ *
460
+ * @param string $item
461
+ * @param mixed $value
462
+ *
463
+ * @return boolean
464
+ *
465
+ * @access public
466
+ * @version 6.4.0
467
+ */
468
+ public function store($item, $value)
469
+ {
470
+ return static::updateOptionItem($item, $value)->save();
471
+ }
472
+
473
  /**
474
  * Reset access settings
475
  *
486
  );
487
  }
488
 
489
+ /**
490
+ * Alias for the `getOption` method
491
+ *
492
+ * @return array
493
+ *
494
+ * @access public
495
+ * @version 6.4.0
496
+ */
497
+ public function toArray()
498
+ {
499
+ return $this->getOption();
500
+ }
501
+
502
  }
application/Core/Object/LoginRedirect.php CHANGED
@@ -10,11 +10,12 @@
10
  /**
11
  * Login redirect object
12
  *
 
13
  * @since 6.1.0 Fixed bug with incorrectly merged settings
14
  * @since 6.0.0 Initial implementation of the class
15
  *
16
  * @package AAM
17
- * @version 6.1.0
18
  */
19
  class AAM_Core_Object_LoginRedirect extends AAM_Core_Object
20
  {
@@ -28,7 +29,11 @@ class AAM_Core_Object_LoginRedirect extends AAM_Core_Object
28
 
29
  /**
30
  * @inheritdoc
31
- * @version 6.0.0
 
 
 
 
32
  */
33
  protected function initialize()
34
  {
@@ -38,6 +43,12 @@ class AAM_Core_Object_LoginRedirect extends AAM_Core_Object
38
  // If options are defined, set the overwritten flag
39
  $this->determineOverwritten($option);
40
 
 
 
 
 
 
 
41
  $this->setOption(is_array($option) ? $option : array());
42
  }
43
 
10
  /**
11
  * Login redirect object
12
  *
13
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/62
14
  * @since 6.1.0 Fixed bug with incorrectly merged settings
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
+ * @version 6.4.0
19
  */
20
  class AAM_Core_Object_LoginRedirect extends AAM_Core_Object
21
  {
29
 
30
  /**
31
  * @inheritdoc
32
+ *
33
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/62
34
+ * @since 6.0.0 Initial implementation of the method
35
+ *
36
+ * @version 6.4.0
37
  */
38
  protected function initialize()
39
  {
43
  // If options are defined, set the overwritten flag
44
  $this->determineOverwritten($option);
45
 
46
+ // Trigger custom functionality that may populate the redirect options. For
47
+ // example, this hooks is used by Access Policy service
48
+ $option = apply_filters(
49
+ 'aam_login_redirect_object_option_filter', $option, $this
50
+ );
51
+
52
  $this->setOption(is_array($option) ? $option : array());
53
  }
54
 
application/Core/Object/LogoutRedirect.php CHANGED
@@ -10,11 +10,12 @@
10
  /**
11
  * Logout redirect object
12
  *
 
13
  * @since 6.1.0 Fixed bug with incorrectly merged settings
14
  * @since 6.0.0 Initial implementation of the class
15
  *
16
  * @package AAM
17
- * @version 6.1.0
18
  */
19
  class AAM_Core_Object_LogoutRedirect extends AAM_Core_Object
20
  {
@@ -28,7 +29,11 @@ class AAM_Core_Object_LogoutRedirect extends AAM_Core_Object
28
 
29
  /**
30
  * @inheritdoc
31
- * @version 6.0.0
 
 
 
 
32
  */
33
  protected function initialize()
34
  {
@@ -38,6 +43,12 @@ class AAM_Core_Object_LogoutRedirect extends AAM_Core_Object
38
  // If options are defined, set the overwritten flag
39
  $this->determineOverwritten($option);
40
 
 
 
 
 
 
 
41
  $this->setOption(is_array($option) ? $option : array());
42
  }
43
 
10
  /**
11
  * Logout redirect object
12
  *
13
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/63
14
  * @since 6.1.0 Fixed bug with incorrectly merged settings
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
+ * @version 6.4.0
19
  */
20
  class AAM_Core_Object_LogoutRedirect extends AAM_Core_Object
21
  {
29
 
30
  /**
31
  * @inheritdoc
32
+ *
33
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/63
34
+ * @since 6.0.0 Initial implementation of the method
35
+ *
36
+ * @version 6.4.0
37
  */
38
  protected function initialize()
39
  {
43
  // If options are defined, set the overwritten flag
44
  $this->determineOverwritten($option);
45
 
46
+ // Trigger custom functionality that may populate the redirect options. For
47
+ // example, this hooks is used by Access Policy service
48
+ $option = apply_filters(
49
+ 'aam_logout_redirect_object_option_filter', $option, $this
50
+ );
51
+
52
  $this->setOption(is_array($option) ? $option : array());
53
  }
54
 
application/Core/Object/NotFoundRedirect.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * ======================================================================
5
+ * LICENSE: This file is subject to the terms and conditions defined in *
6
+ * file 'license.txt', which is part of this source code package. *
7
+ * ======================================================================
8
+ */
9
+
10
+ /**
11
+ * 404 (Not Found) redirect object
12
+ *
13
+ * @package AAM
14
+ * @version 6.4.0
15
+ */
16
+ class AAM_Core_Object_NotFoundRedirect extends AAM_Core_Object
17
+ {
18
+
19
+ /**
20
+ * Type of object
21
+ *
22
+ * @version 6.4.0
23
+ */
24
+ const OBJECT_TYPE = 'notFoundRedirect';
25
+
26
+ /**
27
+ * @inheritdoc
28
+ * @version 6.4.0
29
+ */
30
+ protected function initialize()
31
+ {
32
+ // Initialize the settings
33
+ $option = $this->getSubject()->readOption(self::OBJECT_TYPE);
34
+
35
+ // If options are defined, set the overwritten flag
36
+ $this->determineOverwritten($option);
37
+
38
+ // Trigger custom functionality that may populate the redirect options. For
39
+ // example, this hooks is used by Access Policy service
40
+ $option = apply_filters(
41
+ 'aam_404_redirect_object_option_filter', $option, $this
42
+ );
43
+
44
+ $this->setOption(is_array($option) ? $option : array());
45
+ }
46
+
47
+ /**
48
+ * Merge settings
49
+ *
50
+ * The last subject overrides previous
51
+ *
52
+ * @param array $options
53
+ *
54
+ * @return array
55
+ *
56
+ * @access public
57
+ * @version 6.4.0
58
+ */
59
+ public function mergeOption($options)
60
+ {
61
+ return array_replace_recursive($options, $this->getOption());
62
+ }
63
+
64
+ }
application/Core/Object/Redirect.php CHANGED
@@ -10,11 +10,12 @@
10
  /**
11
  * Access denied redirect object
12
  *
 
13
  * @since 6.1.0 Fixed bug with incorrectly merged settings
14
  * @since 6.0.0 Initial implementation of the class
15
  *
16
  * @package AAM
17
- * @version 6.1.0
18
  */
19
  class AAM_Core_Object_Redirect extends AAM_Core_Object
20
  {
@@ -28,6 +29,10 @@ class AAM_Core_Object_Redirect extends AAM_Core_Object
28
 
29
  /**
30
  * @inheritdoc
 
 
 
 
31
  * @version 6.0.0
32
  */
33
  protected function initialize()
@@ -36,6 +41,10 @@ class AAM_Core_Object_Redirect extends AAM_Core_Object
36
 
37
  $this->determineOverwritten($option);
38
 
 
 
 
 
39
  $this->setOption(is_array($option) ? $option : array());
40
  }
41
 
10
  /**
11
  * Access denied redirect object
12
  *
13
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/61
14
  * @since 6.1.0 Fixed bug with incorrectly merged settings
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
+ * @version 6.4.0
19
  */
20
  class AAM_Core_Object_Redirect extends AAM_Core_Object
21
  {
29
 
30
  /**
31
  * @inheritdoc
32
+ *
33
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/61
34
+ * @since 6.0.0 Initial implementation of the method
35
+ *
36
  * @version 6.0.0
37
  */
38
  protected function initialize()
41
 
42
  $this->determineOverwritten($option);
43
 
44
+ // Trigger custom functionality that may populate the redirect options. For
45
+ // example, this hooks is used by Access Policy service
46
+ $option = apply_filters('aam_redirect_object_option_filter', $option, $this);
47
+
48
  $this->setOption(is_array($option) ? $option : array());
49
  }
50
 
application/Core/Object/Route.php CHANGED
@@ -10,11 +10,12 @@
10
  /**
11
  * API route object
12
  *
 
13
  * @since 6.1.0 Fixed bug with incorrectly halted inheritance mechanism
14
  * @since 6.0.0 Initial implementation of the class
15
  *
16
  * @package AAM
17
- * @version 6.1.0
18
  */
19
  class AAM_Core_Object_Route extends AAM_Core_Object
20
  {
@@ -56,15 +57,26 @@ class AAM_Core_Object_Route extends AAM_Core_Object
56
  *
57
  * @return boolean
58
  *
 
 
 
 
59
  * @access public
60
- * @version 6.0.0
61
  */
62
  public function isRestricted($type, $route, $method = 'POST')
63
  {
64
  $options = $this->getOption();
65
  $id = strtolower("{$type}|{$route}|{$method}");
 
 
 
 
 
 
 
66
 
67
- return !empty($options[$id]);
68
  }
69
 
70
  }
10
  /**
11
  * API route object
12
  *
13
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/56
14
  * @since 6.1.0 Fixed bug with incorrectly halted inheritance mechanism
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
+ * @version 6.4.0
19
  */
20
  class AAM_Core_Object_Route extends AAM_Core_Object
21
  {
57
  *
58
  * @return boolean
59
  *
60
+ * @since 6.4.0 Added `aam_route_match_filter` to support enhancement
61
+ * https://github.com/aamplugin/advanced-access-manager/issues/56
62
+ * @since 6.0.0 Initial implementation of the method
63
+ *
64
  * @access public
65
+ * @version 6.4.0
66
  */
67
  public function isRestricted($type, $route, $method = 'POST')
68
  {
69
  $options = $this->getOption();
70
  $id = strtolower("{$type}|{$route}|{$method}");
71
+ $matched = !empty($options[$id]);
72
+
73
+ if ($matched === false) {
74
+ $matched = apply_filters(
75
+ 'aam_route_match_filter', false, $type, $route, $method, $this
76
+ );
77
+ }
78
 
79
+ return $matched;
80
  }
81
 
82
  }
application/Core/Object/Uri.php CHANGED
@@ -56,17 +56,18 @@ class AAM_Core_Object_Uri extends AAM_Core_Object
56
  *
57
  * @return null|array
58
  *
59
- * @since 6.3.0 Fixed bug https://github.com/aamplugin/advanced-access-manager/issues/17
 
60
  * @since 6.0.0 Initial implementation of the method
61
  *
62
  * @access public
63
- * @version 6.3.0
64
  */
65
  public function findMatch($s, $params = array())
66
  {
67
  $match = null;
68
 
69
- foreach ($this->getOption() as $uri => $rule) {
70
  $meta = wp_parse_url($uri);
71
  $out = array();
72
 
@@ -187,4 +188,30 @@ class AAM_Core_Object_Uri extends AAM_Core_Object
187
  return $merged;
188
  }
189
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  }
56
  *
57
  * @return null|array
58
  *
59
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/77
60
+ * @since 6.3.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/17
61
  * @since 6.0.0 Initial implementation of the method
62
  *
63
  * @access public
64
+ * @version 6.4.0
65
  */
66
  public function findMatch($s, $params = array())
67
  {
68
  $match = null;
69
 
70
+ foreach ($this->normalizeOrder() as $uri => $rule) {
71
  $meta = wp_parse_url($uri);
72
  $out = array();
73
 
188
  return $merged;
189
  }
190
 
191
+ /**
192
+ * Sort rules in proper order
193
+ *
194
+ * Place all "allowed" rules in the end of the list to allow the ability to
195
+ * define whitelisted set of conditions
196
+ *
197
+ * @return array
198
+ *
199
+ * @access protected
200
+ * @version 6.4.0
201
+ */
202
+ protected function normalizeOrder()
203
+ {
204
+ $rules = $allowed = array();
205
+
206
+ foreach ($this->getOption() as $uri => $rule) {
207
+ if ($rule['type'] === 'allow') {
208
+ $allowed[$uri] = $rule;
209
+ } else {
210
+ $rules[$uri] = $rule;
211
+ }
212
+ }
213
+
214
+ return array_merge($rules, $allowed);
215
+ }
216
+
217
  }
application/Core/Policy/Generator.php CHANGED
@@ -10,13 +10,15 @@
10
  /**
11
  * AAM core policy generator
12
  *
 
 
13
  * @since 6.3.0 Refactored post statement generation to cover the bug
14
  * https://github.com/aamplugin/advanced-access-manager/issues/22
15
  * @since 6.2.2 Fixed bug with incompatibility with PHP lower than 7.0.0
16
  * @since 6.2.0 Initial implementation of the class
17
  *
18
  * @package AAM
19
- * @version 6.3.0
20
  */
21
  class AAM_Core_Policy_Generator
22
  {
@@ -47,8 +49,12 @@ class AAM_Core_Policy_Generator
47
  *
48
  * @param AAM_Core_Subject $subject
49
  *
 
 
 
 
50
  * @access public
51
- * @version 6.2.0
52
  */
53
  public function __construct(AAM_Core_Subject $subject)
54
  {
@@ -59,14 +65,6 @@ class AAM_Core_Policy_Generator
59
  $xpath .= ($subject->getId() ? '.' . $subject->getId() : '');
60
 
61
  $this->settings = AAM_Core_AccessSettings::getInstance()->get($xpath);
62
-
63
- // Share post access settings conversion with add-ons and other third-party
64
- // solutions
65
- add_filter('aam_post_policy_generator_filter', function($list, $res, $opts) {
66
- return array_merge(
67
- $list, $this->_convertToPostStatements($res, $opts)
68
- );
69
- }, 10, 3);
70
  }
71
 
72
  /**
@@ -74,78 +72,32 @@ class AAM_Core_Policy_Generator
74
  *
75
  * @return string
76
  *
 
 
 
 
77
  * @access public
78
- * @version 6.2.0
79
  */
80
  public function generate()
81
  {
82
- $generated = array(
83
  'Statement' => array(),
84
  'Param' => array()
85
  );
86
 
87
- foreach($this->settings as $res_type => $data) {
88
- switch($res_type) {
89
- case AAM_Core_Object_Menu::OBJECT_TYPE:
90
- $generated['Statement'] = array_merge(
91
- $generated['Statement'],
92
- $this->generateBackendMenuStatements($data)
93
- );
94
- break;
95
-
96
- case AAM_Core_Object_Toolbar::OBJECT_TYPE:
97
- $generated['Statement'] = array_merge(
98
- $generated['Statement'],
99
- $this->generateToolbarStatements($data)
100
- );
101
- break;
102
-
103
- case AAM_Core_Object_Metabox::OBJECT_TYPE:
104
- $generated['Statement'] = array_merge(
105
- $generated['Statement'],
106
- $this->generateMetaboxStatements($data)
107
- );
108
- break;
109
-
110
- case AAM_Core_Object_Post::OBJECT_TYPE:
111
- $generated['Statement'] = array_merge(
112
- $generated['Statement'],
113
- $this->generatePostStatements($data)
114
- );
115
- break;
116
-
117
- case AAM_Core_Object_Uri::OBJECT_TYPE:
118
- $generated['Statement'] = array_merge(
119
- $generated['Statement'],
120
- $this->generateUriStatements($data)
121
- );
122
- break;
123
-
124
- case AAM_Core_Object_Route::OBJECT_TYPE:
125
- $generated['Statement'] = array_merge(
126
- $generated['Statement'],
127
- $this->generateRouteStatements($data)
128
- );
129
- break;
130
-
131
- default:
132
- $generated = apply_filters(
133
- 'aam_generated_policy_filter',
134
- $generated,
135
- $res_type,
136
- $data,
137
- $this->subject
138
- );
139
- break;
140
- }
141
  }
142
 
143
- // If subject is User, then also include combined list of capabilities that
144
- // are assigned to him
145
- if (is_a($this->subject, 'AAM_Core_Subject_User')) {
146
  $allowed = $denied = array();
147
 
148
- foreach($this->subject->allcaps as $cap => $effect) {
149
  if (!empty($effect)) {
150
  $allowed[] = 'Capability:' . $cap;
151
  } else {
@@ -154,14 +106,14 @@ class AAM_Core_Policy_Generator
154
  }
155
 
156
  if (!empty($allowed)) {
157
- $generated['Statement'][] = array(
158
  'Effect' => 'allow',
159
  'Resource' => $allowed
160
  );
161
  }
162
 
163
  if (!empty($denied)) {
164
- $generated['Statement'][] = array(
165
  'Effect' => 'deny',
166
  'Enforce' => true,
167
  'Resource' => $denied
@@ -169,322 +121,62 @@ class AAM_Core_Policy_Generator
169
  }
170
  }
171
 
172
- $policy = json_decode(
173
  AAM_Backend_Feature_Main_Policy::getDefaultPolicy(), true
174
  );
175
 
176
- return wp_json_encode(array_merge($policy, $generated));
177
- }
178
-
179
- /**
180
- * Generate Backend Menu statements
181
- *
182
- * @param array $menus
183
- *
184
- * @return array
185
- *
186
- * @access protected
187
- * @version 6.2.0
188
- */
189
- protected function generateBackendMenuStatements($menus)
190
- {
191
- return $this->_generateBasicStatements($menus, 'BackendMenu');
192
- }
193
-
194
- /**
195
- * Generate Toolbar statements
196
- *
197
- * @param array $toolbar
198
- *
199
- * @return array
200
- *
201
- * @access protected
202
- * @version 6.2.0
203
- */
204
- protected function generateToolbarStatements($toolbar)
205
- {
206
- return $this->_generateBasicStatements($toolbar, 'Toolbar');
207
- }
208
-
209
- /**
210
- * Generate URI statements
211
- *
212
- * @param array $uris
213
- *
214
- * @return array
215
- *
216
- * @access protected
217
- * @version 6.2.0
218
- */
219
- protected function generateUriStatements($uris)
220
- {
221
- return $this->_generateBasicStatements($uris, 'URI');
222
- }
223
-
224
- /**
225
- * Generate API Route statements
226
- *
227
- * @param array $routes
228
- *
229
- * @return array
230
- *
231
- * @access protected
232
- * @version 6.2.0
233
- */
234
- protected function generateRouteStatements($routes)
235
- {
236
- $normalized = array();
237
-
238
- foreach($routes as $id => $effect) {
239
- $normalized[str_replace('|', ':', $id)] = $effect;
240
- }
241
-
242
- return $this->_generateBasicStatements($normalized, 'Route');
243
- }
244
-
245
- /**
246
- * Generate Metabox & Widget statements
247
- *
248
- * @param array $list
249
- *
250
- * @return array
251
- *
252
- * @access protected
253
- * @version 6.2.0
254
- */
255
- protected function generateMetaboxStatements($list)
256
- {
257
- $metaboxes = $widgets = array();
258
-
259
- foreach($list as $id => $effect) {
260
- $parts = explode('|', $id);
261
-
262
- if (in_array($parts[0], array('dashboard', 'widget'), true)) {
263
- $widgets[$id] = $effect;
264
- } else {
265
- $metaboxes[$id] = $effect;
266
- }
267
- }
268
-
269
- return array_merge(
270
- $this->_generateBasicStatements($widgets, 'Widget'),
271
- $this->_generateBasicStatements($metaboxes, 'Metabox')
272
- );
273
- }
274
-
275
- /**
276
- * Generate Post statements
277
- *
278
- * @param array $posts
279
- *
280
- * @return array
281
- *
282
- * @access protected
283
- * @version 6.2.0
284
- */
285
- protected function generatePostStatements($posts)
286
- {
287
- $statements = array();
288
-
289
- foreach($posts as $id => $options) {
290
- $parts = explode('|', $id);
291
- $resource = "Post:{$parts[1]}:{$parts[0]}";
292
-
293
- $statements = array_merge(
294
- $statements, $this->_convertToPostStatements($resource, $options)
295
- );
296
- }
297
-
298
- return $statements;
299
  }
300
 
301
  /**
302
- * Convert post settings to policy format
303
  *
304
- * @param string $resource
305
  * @param array $options
 
306
  *
307
  * @return array
308
  *
309
- * @since 6.3.0 Fixed bug https://github.com/aamplugin/advanced-access-manager/issues/22
310
- * @since 6.2.2 Fixed bug that caused fatal error for PHP lower than 7.0.0
311
- * @since 6.2.0 Initial implementation of the method
312
- *
313
- * @access private
314
- * @version 6.3.0
315
  */
316
- private function _convertToPostStatements($resource, $options)
317
  {
318
- $tree = (object) array(
319
- 'allowed' => array(),
320
- 'denied' => array(),
321
- 'statements' => array()
322
- );
323
-
324
- foreach($options as $option => $settings) {
325
- // Compute Effect property
326
- if (is_bool($settings)) {
327
- $effect = ($settings === true ? 'denied' : 'allowed');
328
- } else {
329
- $effect = (!empty($settings['enabled']) ? 'denied' : 'allowed');
330
- }
331
-
332
- $action = null;
333
 
334
- switch($option) {
335
- case 'restricted':
336
- $action = 'Read';
337
- break;
338
 
339
- case 'comment':
340
- case 'edit':
341
- case 'delete':
342
- case 'publish':
343
- case 'create':
344
- $action = ucfirst($option);
345
- break;
346
-
347
- case 'hidden':
348
- $item = array(
349
- 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
350
- 'Action' => 'List',
351
- 'Resource' => $resource
352
- );
353
-
354
- $conditions = array();
355
-
356
- if (is_array($settings)) {
357
- if (!empty($settings['frontend'])) {
358
- $conditions['(*boolean)${CALLBACK.is_admin}'] = false;
359
- }
360
- if (!empty($settings['backend'])) {
361
- $conditions['(*boolean)${CALLBACK.is_admin}'] = true;
362
- }
363
- if (!empty($settings['api'])) {
364
- $conditions['(*boolean)${CONST.REST_REQUEST}'] = true;
365
- }
366
- }
367
 
368
- if (!empty($conditions)) {
369
- $item['Condition']['Equals'] = $conditions;
370
- }
371
-
372
- $tree->statements[] = $item;
373
- break;
374
-
375
- case 'teaser':
376
- $tree->statements[] = array(
377
- 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
378
- 'Action' => 'Read',
379
- 'Resource' => $resource,
380
- 'Metadata' => array(
381
- 'Teaser' => array(
382
- 'Value' => $settings['message']
383
- )
384
- )
385
- );
386
- break;
387
-
388
- case 'limited':
389
- $tree->statements[] = array(
390
- 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
391
- 'Action' => 'Read',
392
- 'Resource' => $resource,
393
- 'Metadata' => array(
394
- 'Limited' => array(
395
- 'Threshold' => intval($settings['threshold'])
396
- )
397
- )
398
- );
399
- break;
400
 
401
- case 'redirected':
402
- $metadata = array(
403
- 'Type' => $settings['type'],
404
- 'Code' => intval(isset($settings['httpCode']) ? $settings['httpCode'] : 307)
405
- );
406
 
407
- if ($settings['type'] === 'page') {
408
- $metadata['Id'] = intval($settings['destination']);
409
- } elseif ($settings['type'] === 'url') {
410
- $metadata['URL'] = trim($settings['destination']);
411
- } elseif ($settings['type'] === 'callback') {
412
- $metadata['Callback'] = trim($settings['destination']);
413
  }
414
-
415
- $tree->statements[] = array(
416
- 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
417
- 'Action' => 'Read',
418
- 'Resource' => $resource,
419
- 'Metadata' => array(
420
- 'Redirect' => $metadata
421
- )
422
- );
423
- break;
424
-
425
- case 'protected':
426
- $tree->statements[] = array(
427
- 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
428
- 'Action' => 'Read',
429
- 'Resource' => $resource,
430
- 'Metadata' => array(
431
- 'Password' => array(
432
- 'Value' => $settings['password']
433
- )
434
- )
435
- );
436
- break;
437
-
438
- case 'ceased':
439
- $tree->statements[] = array(
440
- 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
441
- 'Action' => 'Read',
442
- 'Resource' => $resource,
443
- 'Condition' => array(
444
- 'Greater' => array(
445
- '(*int)${DATETIME.U}' => intval($settings['after'])
446
- )
447
- )
448
- );
449
- break;
450
-
451
- default:
452
- do_action(
453
- 'aam_post_option_to_policy_action',
454
- $resource,
455
- $option,
456
- $effect,
457
- $settings,
458
- $tree
459
- );
460
- break;
461
- }
462
-
463
- if ($action !== null) {
464
- if ($effect === 'allowed') {
465
- $tree->allowed[] = $resource . ':' . $action;
466
- } else {
467
- $tree->denied[] = $resource . ':' . $action;
468
  }
469
- }
470
- }
471
 
472
- // Finally prepare the consolidated statements
473
- if (!empty($tree->denied)) {
474
- $tree->statements[] = array(
475
- 'Effect' => 'deny',
476
- 'Resource' => $tree->denied
477
- );
478
- }
479
-
480
- if (!empty($tree->allowed)) {
481
- $tree->statements[] = array(
482
- 'Effect' => 'allow',
483
- 'Resource' => $tree->allowed
484
- );
485
  }
486
 
487
- return $tree->statements;
488
  }
489
 
490
  /**
@@ -495,10 +187,13 @@ class AAM_Core_Policy_Generator
495
  *
496
  * @return array
497
  *
498
- * @access private
 
 
 
499
  * @version 6.2.0
500
  */
501
- private function _generateBasicStatements($options, $resource)
502
  {
503
  $denied = $allowed = $statements = array();
504
 
10
  /**
11
  * AAM core policy generator
12
  *
13
+ * @since 6.4.0 Enhanced with redirects params generation
14
+ * Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
15
  * @since 6.3.0 Refactored post statement generation to cover the bug
16
  * https://github.com/aamplugin/advanced-access-manager/issues/22
17
  * @since 6.2.2 Fixed bug with incompatibility with PHP lower than 7.0.0
18
  * @since 6.2.0 Initial implementation of the class
19
  *
20
  * @package AAM
21
+ * @version 6.4.0
22
  */
23
  class AAM_Core_Policy_Generator
24
  {
49
  *
50
  * @param AAM_Core_Subject $subject
51
  *
52
+ * @since 6.4.0 Removed `aam_post_policy_generator_filter` and moved it to the
53
+ * content service
54
+ * @since 6.2.0 Initial implementation of the method
55
+ *
56
  * @access public
57
+ * @version 6.4.0
58
  */
59
  public function __construct(AAM_Core_Subject $subject)
60
  {
65
  $xpath .= ($subject->getId() ? '.' . $subject->getId() : '');
66
 
67
  $this->settings = AAM_Core_AccessSettings::getInstance()->get($xpath);
 
 
 
 
 
 
 
 
68
  }
69
 
70
  /**
72
  *
73
  * @return string
74
  *
75
+ * @since 6.4.0 Enhanced with redirect rules generators
76
+ * Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
77
+ * @since 6.2.0 Initial implementation of the method
78
+ *
79
  * @access public
80
+ * @version 6.4.0
81
  */
82
  public function generate()
83
  {
84
+ $policy = array(
85
  'Statement' => array(),
86
  'Param' => array()
87
  );
88
 
89
+ foreach($this->settings as $type => $data) {
90
+ $policy = apply_filters(
91
+ 'aam_generated_policy_filter', $policy, $type, $data, $this
92
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  }
94
 
95
+ // If subject is User or Role, then also include explicitly defined
96
+ // capabilities
97
+ if (in_array($this->subject::UID, array('user', 'role'))) {
98
  $allowed = $denied = array();
99
 
100
+ foreach($this->subject->getCapabilities() as $cap => $effect) {
101
  if (!empty($effect)) {
102
  $allowed[] = 'Capability:' . $cap;
103
  } else {
106
  }
107
 
108
  if (!empty($allowed)) {
109
+ $policy['Statement'][] = array(
110
  'Effect' => 'allow',
111
  'Resource' => $allowed
112
  );
113
  }
114
 
115
  if (!empty($denied)) {
116
+ $policy['Statement'][] = array(
117
  'Effect' => 'deny',
118
  'Enforce' => true,
119
  'Resource' => $denied
121
  }
122
  }
123
 
124
+ $base = json_decode(
125
  AAM_Backend_Feature_Main_Policy::getDefaultPolicy(), true
126
  );
127
 
128
+ return wp_json_encode(array_merge($base, $policy));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  }
130
 
131
  /**
132
+ * Generate Login/Logout/404 Redirect params
133
  *
 
134
  * @param array $options
135
+ * @param string $type
136
  *
137
  * @return array
138
  *
139
+ * @access public
140
+ * @version 6.4.0
 
 
 
 
141
  */
142
+ public function generateRedirectParam($options, $type)
143
  {
144
+ $params = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
+ foreach($options as $key => $val) {
147
+ $parts = explode('.', $key);
 
 
148
 
149
+ if ($parts[2] === 'type') {
150
+ $destination = $options["{$type}.redirect.{$val}"];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
 
152
+ $value = array(
153
+ 'Type' => $val
154
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
 
156
+ if ($val === 'page') {
157
+ $page = get_post($destination);
 
 
 
158
 
159
+ if (is_a($page, 'WP_Post')) {
160
+ $value['Slug'] = $page->post_name;
161
+ } else{
162
+ $value['Id'] = intval($destination);
 
 
163
  }
164
+ } elseif ($val === 'url') {
165
+ $value['URL'] = trim($destination);
166
+ } elseif ($val === 'callback') {
167
+ $value['Callback'] = trim($destination);
168
+ } elseif ($val === 'message') {
169
+ $value['Message'] = $destination;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  }
 
 
171
 
172
+ $params[] = array(
173
+ 'Key' => "redirect:on:{$type}",
174
+ 'Value' => $value
175
+ );
176
+ }
 
 
 
 
 
 
 
 
177
  }
178
 
179
+ return $params;
180
  }
181
 
182
  /**
187
  *
188
  * @return array
189
  *
190
+ * @since 6.4.0 Made the method public
191
+ * @since 6.2.0 Initial implementation of the method
192
+ *
193
+ * @access public
194
  * @version 6.2.0
195
  */
196
+ public function generateBasicStatements($options, $resource)
197
  {
198
  $denied = $allowed = $statements = array();
199
 
application/Core/Policy/Manager.php CHANGED
@@ -10,6 +10,7 @@
10
  /**
11
  * AAM policy manager for a specific subject
12
  *
 
13
  * @since 6.3.1 Fixed bug where draft policies get applied to assignees
14
  * @since 6.2.1 Added support for the POLICY_META token
15
  * @since 6.2.0 Fetched the way access policies are fetched
@@ -18,7 +19,7 @@
18
  * @since 6.0.0 Initial implementation of the class
19
  *
20
  * @package AAM
21
- * @version 6.3.1
22
  */
23
  class AAM_Core_Policy_Manager
24
  {
@@ -87,6 +88,9 @@ class AAM_Core_Policy_Manager
87
  *
88
  * @return mixed
89
  *
 
 
 
90
  * @access public
91
  * @version 6.0.0
92
  */
@@ -98,7 +102,9 @@ class AAM_Core_Policy_Manager
98
  $param = $this->tree['Param'][$id];
99
 
100
  if ($this->isApplicable($param, $args)) {
101
- if (preg_match_all('/(\$\{[^}]+\})/', $param['Value'], $match)) {
 
 
102
  $value = AAM_Core_Policy_Token::evaluate(
103
  $param['Value'], $match[1]
104
  );
@@ -421,12 +427,13 @@ class AAM_Core_Policy_Manager
421
  *
422
  * @return array
423
  *
 
424
  * @since 6.2.1 Typecasting param's value
425
  * @since 6.1.0 Added support for the `=>` (map to) operator
426
  * @since 6.0.0 Initial implementation of the method
427
  *
428
  * @access protected
429
- * @version 6.2.1
430
  */
431
  protected function updatePolicyTree(&$tree, $addition)
432
  {
@@ -484,7 +491,11 @@ class AAM_Core_Policy_Manager
484
  }
485
 
486
  // If necessary typecast the params value
487
- $param['Value'] = AAM_Core_Policy_Typecast::execute($param['Value']);
 
 
 
 
488
 
489
  if (!isset($params[$id]) || empty($params[$id]['Enforce'])) {
490
  $params[$id] = $param;
10
  /**
11
  * AAM policy manager for a specific subject
12
  *
13
+ * @since 6.4.0 Supporting Param's "Value" to be an array
14
  * @since 6.3.1 Fixed bug where draft policies get applied to assignees
15
  * @since 6.2.1 Added support for the POLICY_META token
16
  * @since 6.2.0 Fetched the way access policies are fetched
19
  * @since 6.0.0 Initial implementation of the class
20
  *
21
  * @package AAM
22
+ * @version 6.4.0
23
  */
24
  class AAM_Core_Policy_Manager
25
  {
88
  *
89
  * @return mixed
90
  *
91
+ * @since 6.4.0 Supporting "Value" to be an array
92
+ * @since 6.0.0 Initial implementation of the method
93
+ *
94
  * @access public
95
  * @version 6.0.0
96
  */
102
  $param = $this->tree['Param'][$id];
103
 
104
  if ($this->isApplicable($param, $args)) {
105
+ if (is_scalar($param['Value'])
106
+ && preg_match_all('/(\$\{[^}]+\})/', $param['Value'], $match)
107
+ ) {
108
  $value = AAM_Core_Policy_Token::evaluate(
109
  $param['Value'], $match[1]
110
  );
427
  *
428
  * @return array
429
  *
430
+ * @since 6.4.0 Supporting Param's Value to be more than just a scalar value
431
  * @since 6.2.1 Typecasting param's value
432
  * @since 6.1.0 Added support for the `=>` (map to) operator
433
  * @since 6.0.0 Initial implementation of the method
434
  *
435
  * @access protected
436
+ * @version 6.4.0
437
  */
438
  protected function updatePolicyTree(&$tree, $addition)
439
  {
491
  }
492
 
493
  // If necessary typecast the params value
494
+ if (is_scalar($param['Value'])) {
495
+ $param['Value'] = AAM_Core_Policy_Typecast::execute(
496
+ $param['Value']
497
+ );
498
+ }
499
 
500
  if (!isset($params[$id]) || empty($params[$id]['Enforce'])) {
501
  $params[$id] = $param;
application/Core/Subject/Role.php CHANGED
@@ -5,15 +5,16 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * Role subject
14
  *
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Core_Subject_Role extends AAM_Core_Subject
19
  {
@@ -116,17 +117,41 @@ class AAM_Core_Subject_Role extends AAM_Core_Subject
116
  * Update role name
117
  *
118
  * @param string $name
 
119
  *
120
  * @return boolean
121
  *
 
 
 
122
  * @access public
123
- * @version 6.0.0
124
  */
125
- public function update($name)
126
  {
127
  $roles = AAM_Core_API::getRoles();
128
 
129
  if ($name) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  $roles->roles[$this->getId()]['name'] = $name;
131
  $status = AAM_Core_API::updateOption($roles->role_key, $roles->roles);
132
  } else {
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
11
  * Role subject
12
  *
13
+ * @since 6.4.0 Added the ability to change role's slug
14
+ * @since 6.0.0 Initial implementation of the class
15
+ *
16
  * @package AAM
17
+ * @version 6.4.0
18
  */
19
  class AAM_Core_Subject_Role extends AAM_Core_Subject
20
  {
117
  * Update role name
118
  *
119
  * @param string $name
120
+ * @param string $slug
121
  *
122
  * @return boolean
123
  *
124
+ * @since 6.4.0 Enhancement https://github.com/aamplugin/advanced-access-manager/issues/72
125
+ * @since 6.0.0 Initial implementation of the method
126
+ *
127
  * @access public
128
+ * @version 6.4.0
129
  */
130
+ public function update($name, $slug = null)
131
  {
132
  $roles = AAM_Core_API::getRoles();
133
 
134
  if ($name) {
135
+ if (!empty($slug) && ($slug !== $this->getId())) {
136
+ $stats = count_users()['avail_roles'];
137
+ $n = (isset($stats[$this->getId()]) ? $stats[$this->getId()] : 0);
138
+
139
+ if ($n === 0) {
140
+ $new_roles = array();
141
+
142
+ foreach($roles->roles as $id => $data) {
143
+ if ($id === $this->getId()) {
144
+ $new_roles[$slug] = $data; // Replace role and preserve order
145
+ } else {
146
+ $new_roles[$id] = $data;
147
+ }
148
+ }
149
+
150
+ $roles->roles = $new_roles;
151
+ $this->setId($slug); // New role's id
152
+ }
153
+ }
154
+
155
  $roles->roles[$this->getId()]['name'] = $name;
156
  $status = AAM_Core_API::updateOption($roles->role_key, $roles->roles);
157
  } else {
application/Migration/2019_12_19-base.php CHANGED
@@ -15,8 +15,11 @@ use AAM_Core_Migration,
15
  /**
16
  * This migration class that just clears all the errors
17
  *
 
 
 
18
  * @package AAM
19
- * @version 6.2.0
20
  */
21
  class Migration620 implements AAM_Core_Contract_MigrationInterface
22
  {
@@ -24,13 +27,19 @@ class Migration620 implements AAM_Core_Contract_MigrationInterface
24
  /**
25
  * @inheritdoc
26
  *
27
- * @version 6.2.0
 
 
 
28
  */
29
  public function run()
30
  {
31
  // Reset failure log
32
  AAM_Core_Migration::resetFailureLog();
33
 
 
 
 
34
  return array('errors' => array());
35
  }
36
 
15
  /**
16
  * This migration class that just clears all the errors
17
  *
18
+ * @since 6.4.0 Fixed bug with unsaved migration
19
+ * @since 6.2.0 Initial implementation of the class
20
+ *
21
  * @package AAM
22
+ * @version 6.4.0
23
  */
24
  class Migration620 implements AAM_Core_Contract_MigrationInterface
25
  {
27
  /**
28
  * @inheritdoc
29
  *
30
+ * @since 6.4.0 Fixed bug with unsaved migration
31
+ * @since 6.2.0 Initial implementation of the method
32
+ *
33
+ * @version 6.4.0
34
  */
35
  public function run()
36
  {
37
  // Reset failure log
38
  AAM_Core_Migration::resetFailureLog();
39
 
40
+ // Finally store this script as completed
41
+ AAM_Core_Migration::storeCompletedScript(basename(__FILE__));
42
+
43
  return array('errors' => array());
44
  }
45
 
application/Migration/2020_02_01-base.php CHANGED
@@ -9,11 +9,15 @@
9
 
10
  namespace AAM\Migration;
11
 
12
- use AAM_Core_Contract_MigrationInterface;
 
13
 
14
  /**
15
  * This migration class that fixes potentially corrupted data with aam_addons option
16
  *
 
 
 
17
  * @package AAM
18
  * @version 6.3.1
19
  */
@@ -23,6 +27,9 @@ class Migration631 implements AAM_Core_Contract_MigrationInterface
23
  /**
24
  * @inheritdoc
25
  *
 
 
 
26
  * @version 6.3.1
27
  */
28
  public function run()
@@ -38,6 +45,9 @@ class Migration631 implements AAM_Core_Contract_MigrationInterface
38
  );
39
  }
40
 
 
 
 
41
  return array('errors' => array());
42
  }
43
 
9
 
10
  namespace AAM\Migration;
11
 
12
+ use AAM_Core_Migration,
13
+ AAM_Core_Contract_MigrationInterface;
14
 
15
  /**
16
  * This migration class that fixes potentially corrupted data with aam_addons option
17
  *
18
+ * @since 6.4.0 Fixed bug with unsaved migration
19
+ * @since 6.3.1 Initial implementation of the method
20
+ *
21
  * @package AAM
22
  * @version 6.3.1
23
  */
27
  /**
28
  * @inheritdoc
29
  *
30
+ * @since 6.4.0 Fixed bug with unsaved migration
31
+ * @since 6.3.1 Initial implementation of the method
32
+ *
33
  * @version 6.3.1
34
  */
35
  public function run()
45
  );
46
  }
47
 
48
+ // Finally store this script as completed
49
+ AAM_Core_Migration::storeCompletedScript(basename(__FILE__));
50
+
51
  return array('errors' => array());
52
  }
53
 
application/Migration/2020_03_02-base.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * ======================================================================
5
+ * LICENSE: This file is subject to the terms and conditions defined in *
6
+ * file 'license.txt', which is part of this source code package. *
7
+ * ======================================================================
8
+ */
9
+
10
+ namespace AAM\Migration;
11
+
12
+ use AAM_Core_Migration,
13
+ AAM_Core_Contract_MigrationInterface;
14
+
15
+ /**
16
+ * Migrating 404 redirect rules to use 404 Redirect object. For more details refer
17
+ * to the https://github.com/aamplugin/advanced-access-manager/issues/64
18
+ *
19
+ * @package AAM
20
+ * @version 6.4.0
21
+ */
22
+ class Migration640 implements AAM_Core_Contract_MigrationInterface
23
+ {
24
+
25
+ /**
26
+ * @inheritdoc
27
+ *
28
+ * @version 6.4.0
29
+ */
30
+ public function run()
31
+ {
32
+ $option = \AAM_Core_API::getOption(
33
+ \AAM_Core_Config::DB_OPTION, array()
34
+ );
35
+
36
+ // Check if there are any 404 redirect access settings defined
37
+ if (isset($option['frontend.404redirect.type'])) {
38
+ $type = $option['frontend.404redirect.type'];
39
+ $redirect = $option["frontend.404redirect.{$type}"];
40
+
41
+ $object = \AAM::api()->getDefault()->getObject(
42
+ \AAM_Core_Object_NotFoundRedirect::OBJECT_TYPE
43
+ );
44
+ $object->setExplicitOption(array(
45
+ '404.redirect.type' => $type,
46
+ "404.redirect.{$type}" => $redirect
47
+ ));
48
+
49
+ $object->save();
50
+
51
+ //if ($object->save()) {
52
+ //\AAM_Core_Config::delete('frontend.404redirect.type');
53
+ //\AAM_Core_Config::delete("frontend.404redirect.{$type}");
54
+ //}
55
+ }
56
+
57
+ // Finally store this script as completed
58
+ AAM_Core_Migration::storeCompletedScript(basename(__FILE__));
59
+
60
+ return array('errors' => array());
61
+ }
62
+
63
+ }
64
+
65
+ if (defined('AAM_KEY')) {
66
+ return (new Migration640())->run();
67
+ }
application/Service/AccessPolicy.php CHANGED
@@ -10,6 +10,8 @@
10
  /**
11
  * Access Policy service
12
  *
 
 
13
  * @since 6.3.1 Fixed incompatibility with plugins that use WP_User::get_role_caps
14
  * method. This method re-index all user capabilities based on assigned
15
  * roles and that flushes capabilities attached with Access Policy
@@ -19,13 +21,22 @@
19
  * @since 6.0.0 Initial implementation of the class
20
  *
21
  * @package AAM
22
- * @version 6.3.1
23
  */
24
  class AAM_Service_AccessPolicy
25
  {
26
  use AAM_Core_Contract_ServiceTrait,
27
  AAM_Core_Contract_RequestTrait;
28
 
 
 
 
 
 
 
 
 
 
29
  /**
30
  * AAM configuration setting that is associated with the feature
31
  *
@@ -169,13 +180,16 @@ class AAM_Service_AccessPolicy
169
  *
170
  * @return void
171
  *
 
 
 
172
  * @since 6.2.1 Access support for custom-fields
173
  * @since 6.2.0 Added new hook into Multisite service through `aam_allowed_site_filter`
174
  * @since 6.1.1 Refactored the way access policy is applied to object
175
  * @since 6.0.0 Initial implementation of the method
176
  *
177
  * @access protected
178
- * @version 6.2.1
179
  */
180
  protected function initializeHooks()
181
  {
@@ -228,6 +242,12 @@ class AAM_Service_AccessPolicy
228
  add_filter('aam_uri_object_option_filter', array($this, 'applyAccessPolicyToObject'), 10, 2);
229
  add_filter('aam_route_object_option_filter', array($this, 'applyAccessPolicyToObject'), 10, 2);
230
 
 
 
 
 
 
 
231
  // Allow third-party to hook into Post resource conversion
232
  add_filter('aam_post_resource_filter', array($this, 'convertPostStatement'), 10, 4);
233
 
@@ -245,6 +265,9 @@ class AAM_Service_AccessPolicy
245
 
246
  return $manager->isAllowed('SITE:' . get_current_blog_id()) !== false;
247
  });
 
 
 
248
  }
249
 
250
  /**
@@ -255,12 +278,13 @@ class AAM_Service_AccessPolicy
255
  *
256
  * @return array
257
  *
 
258
  * @since 6.2.0 Fixed bug when access policy was not applied to visitors
259
  * @since 6.1.1 Optimized policy implementation
260
  * @since 6.0.0 Initial implementation of the method
261
  *
262
  * @access public
263
- * @version 6.2.0
264
  */
265
  public function applyAccessPolicyToObject($options, AAM_Core_Object $object)
266
  {
@@ -290,10 +314,27 @@ class AAM_Service_AccessPolicy
290
  case AAM_Core_Object_Uri::OBJECT_TYPE:
291
  $options = $this->initializeUri($options, $object);
292
  break;
 
293
  case AAM_Core_Object_Route::OBJECT_TYPE:
294
  $options = $this->initializeRoute($options, $object);
295
  break;
296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  default:
298
  break;
299
  }
@@ -550,6 +591,71 @@ class AAM_Service_AccessPolicy
550
  return array_merge($option, $parsed); //First-class citizen
551
  }
552
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
553
  /**
554
  * Check if specified action is allowed upon capability
555
  *
@@ -715,8 +821,12 @@ class AAM_Service_AccessPolicy
715
  *
716
  * @return void
717
  *
 
 
 
 
718
  * @access protected
719
- * @version 6.0.0
720
  */
721
  protected function convertedPostReadAction(&$options, $statement, $ns = '')
722
  {
@@ -755,6 +865,10 @@ class AAM_Service_AccessPolicy
755
  'threshold' => $metadata['Limited']['Threshold']
756
  );
757
  }
 
 
 
 
758
  } else { // Simply restrict access to read a post
759
  $options[$ns . 'restricted'] = $effect;
760
  }
@@ -767,8 +881,11 @@ class AAM_Service_AccessPolicy
767
  *
768
  * @return array
769
  *
 
 
 
770
  * @access protected
771
- * @version 6.0.0
772
  */
773
  protected function convertRedirectAction($metadata)
774
  {
@@ -790,6 +907,8 @@ class AAM_Service_AccessPolicy
790
  $destination = $metadata['URL'];
791
  } elseif ($metadata['Type'] === 'callback') {
792
  $destination = $metadata['Callback'];
 
 
793
  }
794
 
795
  $response['destination'] = $destination;
10
  /**
11
  * Access Policy service
12
  *
13
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
14
+ * Added new hook `aam_post_read_action_conversion_filter`
15
  * @since 6.3.1 Fixed incompatibility with plugins that use WP_User::get_role_caps
16
  * method. This method re-index all user capabilities based on assigned
17
  * roles and that flushes capabilities attached with Access Policy
21
  * @since 6.0.0 Initial implementation of the class
22
  *
23
  * @package AAM
24
+ * @version 6.4.0
25
  */
26
  class AAM_Service_AccessPolicy
27
  {
28
  use AAM_Core_Contract_ServiceTrait,
29
  AAM_Core_Contract_RequestTrait;
30
 
31
+ /**
32
+ * Service alias
33
+ *
34
+ * Is used to get service instance if it is enabled
35
+ *
36
+ * @version 6.4.0
37
+ */
38
+ const SERVICE_ALIAS = 'access-policy';
39
+
40
  /**
41
  * AAM configuration setting that is associated with the feature
42
  *
180
  *
181
  * @return void
182
  *
183
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
184
+ * https://github.com/aamplugin/advanced-access-manager/issues/62
185
+ * https://github.com/aamplugin/advanced-access-manager/issues/63
186
  * @since 6.2.1 Access support for custom-fields
187
  * @since 6.2.0 Added new hook into Multisite service through `aam_allowed_site_filter`
188
  * @since 6.1.1 Refactored the way access policy is applied to object
189
  * @since 6.0.0 Initial implementation of the method
190
  *
191
  * @access protected
192
+ * @version 6.4.0
193
  */
194
  protected function initializeHooks()
195
  {
242
  add_filter('aam_uri_object_option_filter', array($this, 'applyAccessPolicyToObject'), 10, 2);
243
  add_filter('aam_route_object_option_filter', array($this, 'applyAccessPolicyToObject'), 10, 2);
244
 
245
+ // Hooks to support all available Redirects
246
+ add_filter('aam_redirect_object_option_filter', array($this, 'applyAccessPolicyToObject'), 10, 2);
247
+ add_filter('aam_login_redirect_object_option_filter', array($this, 'applyAccessPolicyToObject'), 10, 2);
248
+ add_filter('aam_logout_redirect_object_option_filter', array($this, 'applyAccessPolicyToObject'), 10, 2);
249
+ add_filter('aam_404_redirect_object_option_filter', array($this, 'applyAccessPolicyToObject'), 10, 2);
250
+
251
  // Allow third-party to hook into Post resource conversion
252
  add_filter('aam_post_resource_filter', array($this, 'convertPostStatement'), 10, 4);
253
 
265
 
266
  return $manager->isAllowed('SITE:' . get_current_blog_id()) !== false;
267
  });
268
+
269
+ // Service fetch
270
+ $this->registerService();
271
  }
272
 
273
  /**
278
  *
279
  * @return array
280
  *
281
+ * @since 6.4.0 Enhanced with redirects support
282
  * @since 6.2.0 Fixed bug when access policy was not applied to visitors
283
  * @since 6.1.1 Optimized policy implementation
284
  * @since 6.0.0 Initial implementation of the method
285
  *
286
  * @access public
287
+ * @version 6.4.0
288
  */
289
  public function applyAccessPolicyToObject($options, AAM_Core_Object $object)
290
  {
314
  case AAM_Core_Object_Uri::OBJECT_TYPE:
315
  $options = $this->initializeUri($options, $object);
316
  break;
317
+
318
  case AAM_Core_Object_Route::OBJECT_TYPE:
319
  $options = $this->initializeRoute($options, $object);
320
  break;
321
 
322
+ case AAM_Core_Object_Redirect::OBJECT_TYPE:
323
+ $options = $this->initializeAccessDeniedRedirect($options);
324
+ break;
325
+
326
+ case AAM_Core_Object_LoginRedirect::OBJECT_TYPE:
327
+ $options = $this->initializeRedirect($options, 'login', $subject);
328
+ break;
329
+
330
+ case AAM_Core_Object_LogoutRedirect::OBJECT_TYPE:
331
+ $options = $this->initializeRedirect($options, 'logout', $subject);
332
+ break;
333
+
334
+ case AAM_Core_Object_NotFoundRedirect::OBJECT_TYPE:
335
+ $options = $this->initializeRedirect($options, '404', $subject);
336
+ break;
337
+
338
  default:
339
  break;
340
  }
591
  return array_merge($option, $parsed); //First-class citizen
592
  }
593
 
594
+ /**
595
+ * Initialize Access Denied Redirect rules
596
+ *
597
+ * @param array $option
598
+ *
599
+ * @return array
600
+ *
601
+ * @access protected
602
+ * @version 6.4.0
603
+ */
604
+ protected function initializeAccessDeniedRedirect($option)
605
+ {
606
+ $manager = AAM::api()->getAccessPolicyManager();
607
+ $parsed = array();
608
+ $params = $manager->getParams('redirect:on:access-denied:(.*)');
609
+
610
+ foreach($params as $key => $param) {
611
+ $parts = explode(':', $key);
612
+ $area = array_pop($parts);
613
+ $value = $this->convertRedirectAction($param['Value']);
614
+ $type = (isset($value['type']) ? $value['type'] : 'default');
615
+
616
+ // Populate the object
617
+ $parsed["{$area}.redirect.type"] = $type;
618
+
619
+ if (!empty($value['destination'])) {
620
+ $parsed["{$area}.redirect.{$type}"] = $value['destination'];
621
+ }
622
+ }
623
+
624
+ return array_merge($option, $parsed); //First-class citizen
625
+ }
626
+
627
+ /**
628
+ * Initialize Login/Logout/404 Redirect rules
629
+ *
630
+ * @param array $option
631
+ * @param string $redirect_type
632
+ *
633
+ * @return array
634
+ *
635
+ * @access protected
636
+ * @version 6.4.0
637
+ */
638
+ protected function initializeRedirect($option, $redirect_type, $subject)
639
+ {
640
+ $manager = AAM::api()->getAccessPolicyManager($subject);
641
+ $parsed = array();
642
+ $param = $manager->getParam("redirect:on:{$redirect_type}");
643
+
644
+ if (!empty($param)) {
645
+ $value = $this->convertRedirectAction($param);
646
+ $type = (isset($value['type']) ? $value['type'] : 'default');
647
+
648
+ // Populate the object
649
+ $parsed["{$redirect_type}.redirect.type"] = $type;
650
+
651
+ if (!empty($value['destination'])) {
652
+ $parsed["{$redirect_type}.redirect.{$type}"] = $value['destination'];
653
+ }
654
+ }
655
+
656
+ return array_merge($option, $parsed); //First-class citizen
657
+ }
658
+
659
  /**
660
  * Check if specified action is allowed upon capability
661
  *
821
  *
822
  * @return void
823
  *
824
+ * @since 6.4.0 Added `aam_post_read_action_conversion_filter` to support
825
+ * https://github.com/aamplugin/advanced-access-manager/issues/68
826
+ * @since 6.0.0 Initial implementation of the method
827
+ *
828
  * @access protected
829
+ * @version 6.4.0
830
  */
831
  protected function convertedPostReadAction(&$options, $statement, $ns = '')
832
  {
865
  'threshold' => $metadata['Limited']['Threshold']
866
  );
867
  }
868
+
869
+ $options = apply_filters(
870
+ 'aam_post_read_action_conversion_filter', $options, $statement, $ns
871
+ );
872
  } else { // Simply restrict access to read a post
873
  $options[$ns . 'restricted'] = $effect;
874
  }
881
  *
882
  * @return array
883
  *
884
+ * @since 6.4.0 Added support for the "Custom Message" redirect type
885
+ * @since 6.0.0 Initial implementation of the method
886
+ *
887
  * @access protected
888
+ * @version 6.4.0
889
  */
890
  protected function convertRedirectAction($metadata)
891
  {
907
  $destination = $metadata['URL'];
908
  } elseif ($metadata['Type'] === 'callback') {
909
  $destination = $metadata['Callback'];
910
+ } elseif ($metadata['Type'] === 'message') {
911
+ $destination = $metadata['Message'];
912
  }
913
 
914
  $response['destination'] = $destination;
application/Service/AdminMenu.php CHANGED
@@ -5,20 +5,30 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * Admin Menu service
14
  *
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Service_AdminMenu
19
  {
20
  use AAM_Core_Contract_ServiceTrait;
21
 
 
 
 
 
 
 
 
 
 
22
  /**
23
  * DB cache option
24
  *
@@ -75,8 +85,11 @@ class AAM_Service_AdminMenu
75
  *
76
  * @return void
77
  *
 
 
 
78
  * @access protected
79
- * @version 6.0.0
80
  */
81
  public function initializeHooks()
82
  {
@@ -99,6 +112,11 @@ class AAM_Service_AdminMenu
99
  }
100
  }
101
 
 
 
 
 
 
102
  add_action('aam_clear_settings_action', function() {
103
  AAM_Core_API::deleteOption(self::CACHE_DB_OPTION);
104
  });
@@ -107,6 +125,36 @@ class AAM_Service_AdminMenu
107
  if (!defined('DOING_AJAX') || !DOING_AJAX) {
108
  add_action('admin_init', array($this, 'checkScreenAccess'));
109
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  }
111
 
112
  /**
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
11
  * Admin Menu service
12
  *
13
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
14
+ * @since 6.0.0 Initial implementation of the class
15
+ *
16
  * @package AAM
17
+ * @version 6.4.0
18
  */
19
  class AAM_Service_AdminMenu
20
  {
21
  use AAM_Core_Contract_ServiceTrait;
22
 
23
+ /**
24
+ * Service alias
25
+ *
26
+ * Is used to get service instance if it is enabled
27
+ *
28
+ * @version 6.4.0
29
+ */
30
+ const SERVICE_ALIAS = 'admin-menu';
31
+
32
  /**
33
  * DB cache option
34
  *
85
  *
86
  * @return void
87
  *
88
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
89
+ * @since 6.0.0 Initial implementation of the method
90
+ *
91
  * @access protected
92
+ * @version 6.4.0
93
  */
94
  public function initializeHooks()
95
  {
112
  }
113
  }
114
 
115
+ // Policy generation hook
116
+ add_filter(
117
+ 'aam_generated_policy_filter', array($this, 'generatePolicy'), 10, 4
118
+ );
119
+
120
  add_action('aam_clear_settings_action', function() {
121
  AAM_Core_API::deleteOption(self::CACHE_DB_OPTION);
122
  });
125
  if (!defined('DOING_AJAX') || !DOING_AJAX) {
126
  add_action('admin_init', array($this, 'checkScreenAccess'));
127
  }
128
+
129
+ // Service fetch
130
+ $this->registerService();
131
+ }
132
+
133
+ /**
134
+ * Generate Backend Menu policy statements
135
+ *
136
+ * @param array $policy
137
+ * @param string $resource_type
138
+ * @param array $options
139
+ * @param AAM_Core_Policy_Generator $generator
140
+ *
141
+ * @return array
142
+ *
143
+ * @access public
144
+ * @version 6.4.0
145
+ */
146
+ public function generatePolicy($policy, $resource_type, $options, $generator)
147
+ {
148
+ if ($resource_type === AAM_Core_Object_Menu::OBJECT_TYPE) {
149
+ if (!empty($options)) {
150
+ $policy['Statement'] = array_merge(
151
+ $policy['Statement'],
152
+ $generator->generateBasicStatements($options, 'BackendMenu')
153
+ );
154
+ }
155
+ }
156
+
157
+ return $policy;
158
  }
159
 
160
  /**
application/Service/Capability.php CHANGED
@@ -5,8 +5,6 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
application/Service/Content.php CHANGED
@@ -10,6 +10,7 @@
10
  /**
11
  * Posts & Terms service
12
  *
 
13
  * @since 6.2.0 Enhanced HIDDEN option with more granular access controls
14
  * @since 6.1.0 Multiple bug fixed
15
  * @since 6.0.4 Fixed incompatibility with some quite aggressive plugins
@@ -19,13 +20,22 @@
19
  * @since 6.0.0 Initial implementation of the class
20
  *
21
  * @package AAM
22
- * @version 6.2.0
23
  */
24
  class AAM_Service_Content
25
  {
26
  use AAM_Core_Contract_RequestTrait,
27
  AAM_Core_Contract_ServiceTrait;
28
 
 
 
 
 
 
 
 
 
 
29
  /**
30
  * AAM configuration setting that is associated with the service
31
  *
@@ -155,6 +165,7 @@ class AAM_Service_Content
155
  *
156
  * @return void
157
  *
 
158
  * @since 6.1.0 Fixed the bug where `do_not_allow` capability was mapped to the
159
  * list of post type capabilities
160
  * @since 6.0.2 Removed invocation for the pseudo-cap mapping for post types
@@ -162,7 +173,7 @@ class AAM_Service_Content
162
  * @since 6.0.0 Initial implementation of the method
163
  *
164
  * @access protected
165
- * @version 6.1.0
166
  */
167
  protected function initializeHooks()
168
  {
@@ -236,6 +247,252 @@ class AAM_Service_Content
236
  }
237
  }
238
  }, 10, 2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  }
240
 
241
  /**
10
  /**
11
  * Posts & Terms service
12
  *
13
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
14
  * @since 6.2.0 Enhanced HIDDEN option with more granular access controls
15
  * @since 6.1.0 Multiple bug fixed
16
  * @since 6.0.4 Fixed incompatibility with some quite aggressive plugins
20
  * @since 6.0.0 Initial implementation of the class
21
  *
22
  * @package AAM
23
+ * @version 6.4.0
24
  */
25
  class AAM_Service_Content
26
  {
27
  use AAM_Core_Contract_RequestTrait,
28
  AAM_Core_Contract_ServiceTrait;
29
 
30
+ /**
31
+ * Service alias
32
+ *
33
+ * Is used to get service instance if it is enabled
34
+ *
35
+ * @version 6.4.0
36
+ */
37
+ const SERVICE_ALIAS = 'content';
38
+
39
  /**
40
  * AAM configuration setting that is associated with the service
41
  *
165
  *
166
  * @return void
167
  *
168
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
169
  * @since 6.1.0 Fixed the bug where `do_not_allow` capability was mapped to the
170
  * list of post type capabilities
171
  * @since 6.0.2 Removed invocation for the pseudo-cap mapping for post types
173
  * @since 6.0.0 Initial implementation of the method
174
  *
175
  * @access protected
176
+ * @version 6.4.0
177
  */
178
  protected function initializeHooks()
179
  {
247
  }
248
  }
249
  }, 10, 2);
250
+
251
+ // Policy generation hook
252
+ add_filter(
253
+ 'aam_generated_policy_filter', array($this, 'generatePolicy'), 10, 4
254
+ );
255
+
256
+ // Share post access settings conversion with add-ons and other third-party
257
+ // solutions
258
+ add_filter('aam_post_policy_generator_filter', function($list, $res, $opts) {
259
+ return array_merge(
260
+ $list, $this->_convertToPostStatements($res, $opts)
261
+ );
262
+ }, 10, 3);
263
+
264
+ // Service fetch
265
+ $this->registerService();
266
+ }
267
+
268
+ /**
269
+ * Generate Post policy statements
270
+ *
271
+ * @param array $policy
272
+ * @param string $resource_type
273
+ * @param array $options
274
+ * @param AAM_Core_Policy_Generator $generator
275
+ *
276
+ * @return array
277
+ *
278
+ * @access public
279
+ * @version 6.4.0
280
+ */
281
+ public function generatePolicy($policy, $resource_type, $options, $generator)
282
+ {
283
+ if ($resource_type === AAM_Core_Object_Post::OBJECT_TYPE) {
284
+ if (!empty($options)) {
285
+ $statements = array();
286
+
287
+ foreach($options as $id => $data) {
288
+ $parts = explode('|', $id);
289
+ $post = get_post($parts[0]);
290
+
291
+ if (is_a($post, 'WP_Post')) {
292
+ $resource = "Post:{$parts[1]}:{$post->post_name}";
293
+
294
+ $statements = array_merge(
295
+ $statements,
296
+ $this->_convertToPostStatements($resource, $data)
297
+ );
298
+ }
299
+ }
300
+
301
+ $policy['Statement'] = array_merge($policy['Statement'], $statements);
302
+ }
303
+ }
304
+
305
+ return $policy;
306
+ }
307
+
308
+ /**
309
+ * Convert post settings to policy format
310
+ *
311
+ * @param string $resource
312
+ * @param array $options
313
+ *
314
+ * @return array
315
+ *
316
+ * @since 6.4.0 Moved this method from AAM_Core_Policy_Generator
317
+ * @since 6.3.0 Fixed bug https://github.com/aamplugin/advanced-access-manager/issues/22
318
+ * @since 6.2.2 Fixed bug that caused fatal error for PHP lower than 7.0.0
319
+ * @since 6.2.0 Initial implementation of the method
320
+ *
321
+ * @access private
322
+ * @version 6.4.0
323
+ */
324
+ private function _convertToPostStatements($resource, $options)
325
+ {
326
+ $tree = (object) array(
327
+ 'allowed' => array(),
328
+ 'denied' => array(),
329
+ 'statements' => array()
330
+ );
331
+
332
+ foreach($options as $option => $settings) {
333
+ // Compute Effect property
334
+ if (is_bool($settings)) {
335
+ $effect = ($settings === true ? 'denied' : 'allowed');
336
+ } else {
337
+ $effect = (!empty($settings['enabled']) ? 'denied' : 'allowed');
338
+ }
339
+
340
+ $action = null;
341
+
342
+ switch($option) {
343
+ case 'restricted':
344
+ $action = 'Read';
345
+ break;
346
+
347
+ case 'comment':
348
+ case 'edit':
349
+ case 'delete':
350
+ case 'publish':
351
+ case 'create':
352
+ $action = ucfirst($option);
353
+ break;
354
+
355
+ case 'hidden':
356
+ $item = array(
357
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
358
+ 'Action' => 'List',
359
+ 'Resource' => $resource
360
+ );
361
+
362
+ $conditions = array();
363
+
364
+ if (is_array($settings)) {
365
+ if (!empty($settings['frontend'])) {
366
+ $conditions['(*boolean)${CALLBACK.is_admin}'] = false;
367
+ }
368
+ if (!empty($settings['backend'])) {
369
+ $conditions['(*boolean)${CALLBACK.is_admin}'] = true;
370
+ }
371
+ if (!empty($settings['api'])) {
372
+ $conditions['(*boolean)${CONST.REST_REQUEST}'] = true;
373
+ }
374
+ }
375
+
376
+ if (!empty($conditions)) {
377
+ $item['Condition']['Equals'] = $conditions;
378
+ }
379
+
380
+ $tree->statements[] = $item;
381
+ break;
382
+
383
+ case 'teaser':
384
+ $tree->statements[] = array(
385
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
386
+ 'Action' => 'Read',
387
+ 'Resource' => $resource,
388
+ 'Metadata' => array(
389
+ 'Teaser' => array(
390
+ 'Value' => $settings['message']
391
+ )
392
+ )
393
+ );
394
+ break;
395
+
396
+ case 'limited':
397
+ $tree->statements[] = array(
398
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
399
+ 'Action' => 'Read',
400
+ 'Resource' => $resource,
401
+ 'Metadata' => array(
402
+ 'Limited' => array(
403
+ 'Threshold' => intval($settings['threshold'])
404
+ )
405
+ )
406
+ );
407
+ break;
408
+
409
+ case 'redirected':
410
+ $metadata = array(
411
+ 'Type' => $settings['type'],
412
+ 'Code' => intval(isset($settings['httpCode']) ? $settings['httpCode'] : 307)
413
+ );
414
+
415
+ if ($settings['type'] === 'page') {
416
+ $metadata['Id'] = intval($settings['destination']);
417
+ } elseif ($settings['type'] === 'url') {
418
+ $metadata['URL'] = trim($settings['destination']);
419
+ } elseif ($settings['type'] === 'callback') {
420
+ $metadata['Callback'] = trim($settings['destination']);
421
+ }
422
+
423
+ $tree->statements[] = array(
424
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
425
+ 'Action' => 'Read',
426
+ 'Resource' => $resource,
427
+ 'Metadata' => array(
428
+ 'Redirect' => $metadata
429
+ )
430
+ );
431
+ break;
432
+
433
+ case 'protected':
434
+ $tree->statements[] = array(
435
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
436
+ 'Action' => 'Read',
437
+ 'Resource' => $resource,
438
+ 'Metadata' => array(
439
+ 'Password' => array(
440
+ 'Value' => $settings['password']
441
+ )
442
+ )
443
+ );
444
+ break;
445
+
446
+ case 'ceased':
447
+ $tree->statements[] = array(
448
+ 'Effect' => ($effect === 'denied' ? 'deny' : 'allow'),
449
+ 'Action' => 'Read',
450
+ 'Resource' => $resource,
451
+ 'Condition' => array(
452
+ 'Greater' => array(
453
+ '(*int)${DATETIME.U}' => intval($settings['after'])
454
+ )
455
+ )
456
+ );
457
+ break;
458
+
459
+ default:
460
+ do_action(
461
+ 'aam_post_option_to_policy_action',
462
+ $resource,
463
+ $option,
464
+ $effect,
465
+ $settings,
466
+ $tree
467
+ );
468
+ break;
469
+ }
470
+
471
+ if ($action !== null) {
472
+ if ($effect === 'allowed') {
473
+ $tree->allowed[] = $resource . ':' . $action;
474
+ } else {
475
+ $tree->denied[] = $resource . ':' . $action;
476
+ }
477
+ }
478
+ }
479
+
480
+ // Finally prepare the consolidated statements
481
+ if (!empty($tree->denied)) {
482
+ $tree->statements[] = array(
483
+ 'Effect' => 'deny',
484
+ 'Resource' => $tree->denied
485
+ );
486
+ }
487
+
488
+ if (!empty($tree->allowed)) {
489
+ $tree->statements[] = array(
490
+ 'Effect' => 'allow',
491
+ 'Resource' => $tree->allowed
492
+ );
493
+ }
494
+
495
+ return $tree->statements;
496
  }
497
 
498
  /**
application/Service/Core.php CHANGED
@@ -10,12 +10,13 @@
10
  /**
11
  * AAM core service
12
  *
 
13
  * @since 6.0.5 Making sure that only if user is allowed to manage other users
14
  * @since 6.0.4 Bug fixing. Unwanted "Access Denied" metabox on the Your Profile page
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
- * @version 6.0.5
19
  */
20
  class AAM_Service_Core
21
  {
@@ -34,6 +35,7 @@ class AAM_Service_Core
34
  *
35
  * @access protected
36
  *
 
37
  * @since 6.0.5 Fixed bug when Access Manager metabox is rendered for users that
38
  * have ability to manage other users
39
  * @since 6.0.4 Fixed bug when Access Manager metabox is rendered on profile edit
@@ -41,7 +43,7 @@ class AAM_Service_Core
41
  * @since 6.0.0 Initial implementation of the method
42
  *
43
  * @return void
44
- * @version 6.0.5
45
  */
46
  protected function __construct()
47
  {
@@ -76,6 +78,48 @@ class AAM_Service_Core
76
  }, 1);
77
  }
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  // Check if user has ability to perform certain task based on provided
80
  // capability and meta data
81
  add_filter('map_meta_cap', array($this, 'mapMetaCaps'), 999, 4);
10
  /**
11
  * AAM core service
12
  *
13
+ * @since 6.4.0 Added "Manage Access" toolbar item to single & multisite network
14
  * @since 6.0.5 Making sure that only if user is allowed to manage other users
15
  * @since 6.0.4 Bug fixing. Unwanted "Access Denied" metabox on the Your Profile page
16
  * @since 6.0.0 Initial implementation of the class
17
  *
18
  * @package AAM
19
+ * @version 6.4.0
20
  */
21
  class AAM_Service_Core
22
  {
35
  *
36
  * @access protected
37
  *
38
+ * @since 6.4.0 Added "Manage Access" toolbar item
39
  * @since 6.0.5 Fixed bug when Access Manager metabox is rendered for users that
40
  * have ability to manage other users
41
  * @since 6.0.4 Fixed bug when Access Manager metabox is rendered on profile edit
43
  * @since 6.0.0 Initial implementation of the method
44
  *
45
  * @return void
46
+ * @version 6.4.0
47
  */
48
  protected function __construct()
49
  {
78
  }, 1);
79
  }
80
 
81
+ // Add toolbar "Manage Access" item
82
+ add_action('admin_bar_menu', function($wp_admin_bar) {
83
+ if (current_user_can('aam_manager')) {
84
+ $wp_admin_bar->add_menu(
85
+ array(
86
+ 'parent' => 'site-name',
87
+ 'id' => 'aam',
88
+ 'title' => __('Manager Access', AAM_KEY),
89
+ 'href' => admin_url('admin.php?page=aam'),
90
+ )
91
+ );
92
+ }
93
+ }, 999);
94
+
95
+ // Add "Manage Access" to all sites if multisite network
96
+ if (is_multisite()) {
97
+ add_action('admin_bar_menu', function($wp_admin_bar) {
98
+ $blog_count = count($wp_admin_bar->user->blogs);
99
+
100
+ if (count($blog_count) > 0 || current_user_can('manage_network')) {
101
+ foreach((array) $wp_admin_bar->user->blogs as $blog) {
102
+ switch_to_blog($blog->userblog_id);
103
+
104
+ $menu_id = 'blog-' . $blog->userblog_id;
105
+
106
+ if (current_user_can('aam_manager')) {
107
+ $wp_admin_bar->add_menu(
108
+ array(
109
+ 'parent' => $menu_id,
110
+ 'id' => $menu_id . '-aam',
111
+ 'title' => __('Manage Access', AAM_KEY),
112
+ 'href' => admin_url('admin.php?page=aam'),
113
+ )
114
+ );
115
+ }
116
+
117
+ restore_current_blog();
118
+ }
119
+ }
120
+ }, 999);
121
+ }
122
+
123
  // Check if user has ability to perform certain task based on provided
124
  // capability and meta data
125
  add_filter('map_meta_cap', array($this, 'mapMetaCaps'), 999, 4);
application/Service/DeniedRedirect.php CHANGED
@@ -5,21 +5,32 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * Access Denied Redirect service
14
  *
 
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Service_DeniedRedirect
19
  {
20
 
21
  use AAM_Core_Contract_ServiceTrait;
22
 
 
 
 
 
 
 
 
 
 
23
  /**
24
  * AAM configuration setting that is associated with the service
25
  *
@@ -108,8 +119,12 @@ class AAM_Service_DeniedRedirect
108
  *
109
  * @return void
110
  *
 
 
 
 
111
  * @access protected
112
- * @version 6.0.0
113
  */
114
  protected function initializeHooks()
115
  {
@@ -119,6 +134,72 @@ class AAM_Service_DeniedRedirect
119
 
120
  return array($service, 'processDie');
121
  }, PHP_INT_MAX - 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  }
123
 
124
  /**
@@ -130,8 +211,11 @@ class AAM_Service_DeniedRedirect
130
  *
131
  * @return void
132
  *
 
 
 
133
  * @access public
134
- * @version 6.0.0
135
  */
136
  public function processDie($message, $title = '', $args = array())
137
  {
@@ -140,13 +224,11 @@ class AAM_Service_DeniedRedirect
140
  $isApi = (defined('REST_REQUEST') && REST_REQUEST);
141
 
142
  if (($method !== 'POST') && !$isApi) {
143
- if (is_admin()) {
144
- $area = 'backend';
145
- } else {
146
- $area = 'frontend';
147
- }
148
 
149
- $object = AAM::getUser()->getObject('redirect');
150
  $type = $object->get("{$area}.redirect.type", 'default');
151
 
152
  AAM_Core_Redirect::execute(
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
11
  * Access Denied Redirect service
12
  *
13
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
14
+ * Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
15
+ * @since 6.0.0 Initial implementation of the class
16
+ *
17
  * @package AAM
18
+ * @version 6.4.0
19
  */
20
  class AAM_Service_DeniedRedirect
21
  {
22
 
23
  use AAM_Core_Contract_ServiceTrait;
24
 
25
+ /**
26
+ * Service alias
27
+ *
28
+ * Is used to get service instance if it is enabled
29
+ *
30
+ * @version 6.4.0
31
+ */
32
+ const SERVICE_ALIAS = 'access-denied-redirect';
33
+
34
  /**
35
  * AAM configuration setting that is associated with the service
36
  *
119
  *
120
  * @return void
121
  *
122
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
123
+ * Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
124
+ * @since 6.0.0 Initial implementation of the method
125
+ *
126
  * @access protected
127
+ * @version 6.4.0
128
  */
129
  protected function initializeHooks()
130
  {
134
 
135
  return array($service, 'processDie');
136
  }, PHP_INT_MAX - 1);
137
+
138
+ // Policy generation hook
139
+ add_filter(
140
+ 'aam_generated_policy_filter', array($this, 'generatePolicy'), 10, 3
141
+ );
142
+
143
+ // Service fetch
144
+ $this->registerService();
145
+ }
146
+
147
+ /**
148
+ * Generate Access Denied Redirect policy params
149
+ *
150
+ * @param array $policy
151
+ * @param string $resource_type
152
+ * @param array $options
153
+ *
154
+ * @return array
155
+ *
156
+ * @access public
157
+ * @version 6.4.0
158
+ */
159
+ public function generatePolicy($policy, $resource_type, $options)
160
+ {
161
+ if ($resource_type === AAM_Core_Object_Redirect::OBJECT_TYPE) {
162
+ if (!empty($options)) {
163
+ $params = array();
164
+
165
+ foreach($options as $key => $val) {
166
+ $parts = explode('.', $key);
167
+
168
+ if ($parts[2] === 'type') {
169
+ $destination = $options["{$parts[0]}.redirect.{$val}"];
170
+
171
+ $value = array(
172
+ 'Type' => $val
173
+ );
174
+
175
+ if ($val === 'page') {
176
+ $page = get_post($destination);
177
+
178
+ if (is_a($page, 'WP_Post')) {
179
+ $value['Slug'] = $page->post_name;
180
+ } else{
181
+ $value['Id'] = intval($destination);
182
+ }
183
+ } elseif ($val === 'url') {
184
+ $value['URL'] = trim($destination);
185
+ } elseif ($val === 'callback') {
186
+ $value['Callback'] = trim($destination);
187
+ } elseif ($val === 'message') {
188
+ $value['Message'] = $destination;
189
+ }
190
+
191
+ $params[] = array(
192
+ 'Key' => 'redirect:on:access-denied:' . $parts[0],
193
+ 'Value' => $value
194
+ );
195
+ }
196
+ }
197
+
198
+ $policy["Param"] = array_merge($policy["Param"], $params);
199
+ }
200
+ }
201
+
202
+ return $policy;
203
  }
204
 
205
  /**
211
  *
212
  * @return void
213
  *
214
+ * @since 6.4.0 Small refactoring to meet AAM coding standards
215
+ * @since 6.0.0 Initial implementation of the method
216
+ *
217
  * @access public
218
+ * @version 6.4.0
219
  */
220
  public function processDie($message, $title = '', $args = array())
221
  {
224
  $isApi = (defined('REST_REQUEST') && REST_REQUEST);
225
 
226
  if (($method !== 'POST') && !$isApi) {
227
+ $area = (is_admin() ? 'backend' : 'frontend');
228
+ $object = AAM::getUser()->getObject(
229
+ AAM_Core_Object_Redirect::OBJECT_TYPE
230
+ );
 
231
 
 
232
  $type = $object->get("{$area}.redirect.type", 'default');
233
 
234
  AAM_Core_Redirect::execute(
application/Service/Jwt.php CHANGED
@@ -10,19 +10,30 @@
10
  /**
11
  * JWT Token service
12
  *
 
 
13
  * @since 6.3.0 Fixed incompatibility with other plugins that check for RESTful error
14
  * status through `rest_authentication_errors` filter
15
  * @since 6.1.0 Enriched error response with more details
16
  * @since 6.0.0 Initial implementation of the class
17
  *
18
  * @package AAM
19
- * @version 6.3.0
20
  */
21
  class AAM_Service_Jwt
22
  {
23
  use AAM_Core_Contract_ServiceTrait,
24
  AAM_Core_Contract_RequestTrait;
25
 
 
 
 
 
 
 
 
 
 
26
  /**
27
  * AAM configuration setting that is associated with the service
28
  *
@@ -80,11 +91,13 @@ class AAM_Service_Jwt
80
  *
81
  * @return void
82
  *
 
 
83
  * @since 6.3.0 Fixed bug https://github.com/aamplugin/advanced-access-manager/issues/25
84
  * @since 6.0.0 Initial implementation of the method
85
  *
86
  * @access protected
87
- * @version 6.3.0
88
  */
89
  protected function initializeHooks()
90
  {
@@ -115,6 +128,10 @@ class AAM_Service_Jwt
115
  'description' => __('Issue JWT Token', AAM_KEY),
116
  'type' => 'boolean',
117
  );
 
 
 
 
118
 
119
  return $args;
120
  });
@@ -141,6 +158,9 @@ class AAM_Service_Jwt
141
 
142
  // Fetch specific claim from the JWT token if present
143
  add_filter('aam_get_jwt_claim', array($this, 'getJwtClaim'), 20, 2);
 
 
 
144
  }
145
 
146
  /**
@@ -376,13 +396,31 @@ class AAM_Service_Jwt
376
  *
377
  * @return array
378
  *
 
 
 
379
  * @access public
380
- * @version 6.0.0
381
  */
382
  public function prepareLoginResponse(array $response, WP_REST_Request $request)
383
  {
384
  if ($request->get_param('issueJWT') === true) {
385
- $jwt = $this->issueToken($response['user']->ID);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
 
387
  $response['jwt'] = array(
388
  'token' => $jwt->token,
10
  /**
11
  * JWT Token service
12
  *
13
+ * @since 6.4.0 Added the ability to issue refreshable token via API.
14
+ * Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
15
  * @since 6.3.0 Fixed incompatibility with other plugins that check for RESTful error
16
  * status through `rest_authentication_errors` filter
17
  * @since 6.1.0 Enriched error response with more details
18
  * @since 6.0.0 Initial implementation of the class
19
  *
20
  * @package AAM
21
+ * @version 6.4.0
22
  */
23
  class AAM_Service_Jwt
24
  {
25
  use AAM_Core_Contract_ServiceTrait,
26
  AAM_Core_Contract_RequestTrait;
27
 
28
+ /**
29
+ * Service alias
30
+ *
31
+ * Is used to get service instance if it is enabled
32
+ *
33
+ * @version 6.4.0
34
+ */
35
+ const SERVICE_ALIAS = 'jwt';
36
+
37
  /**
38
  * AAM configuration setting that is associated with the service
39
  *
91
  *
92
  * @return void
93
  *
94
+ * @since 6.4.0 Added the ability to issue refreshable token through API.
95
+ * Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
96
  * @since 6.3.0 Fixed bug https://github.com/aamplugin/advanced-access-manager/issues/25
97
  * @since 6.0.0 Initial implementation of the method
98
  *
99
  * @access protected
100
+ * @version 6.4.0
101
  */
102
  protected function initializeHooks()
103
  {
128
  'description' => __('Issue JWT Token', AAM_KEY),
129
  'type' => 'boolean',
130
  );
131
+ $args['refreshableJWT'] = array(
132
+ 'description' => __('Issue a refreshable JWT Token', AAM_KEY),
133
+ 'type' => 'boolean',
134
+ );
135
 
136
  return $args;
137
  });
158
 
159
  // Fetch specific claim from the JWT token if present
160
  add_filter('aam_get_jwt_claim', array($this, 'getJwtClaim'), 20, 2);
161
+
162
+ // Service fetch
163
+ $this->registerService();
164
  }
165
 
166
  /**
396
  *
397
  * @return array
398
  *
399
+ * @since 6.4.0 Added the ability to issue refreshable token
400
+ * @since 6.0.0 Initial implementation of the method
401
+ *
402
  * @access public
403
+ * @version 6.4.0
404
  */
405
  public function prepareLoginResponse(array $response, WP_REST_Request $request)
406
  {
407
  if ($request->get_param('issueJWT') === true) {
408
+ $refreshable = $request->get_param('refreshableJWT');
409
+
410
+ if ($refreshable) {
411
+ $refreshable = user_can(
412
+ $response['user']->ID, 'aam_issue_refreshable_jwt'
413
+ );
414
+
415
+ if ($refreshable === false) {
416
+ throw new Exception(
417
+ __('Current user is not allowed to issue refreshable JWT token', AAM_KEY),
418
+ 400
419
+ );
420
+ }
421
+ }
422
+
423
+ $jwt = $this->issueToken($response['user']->ID, null, null, $refreshable);
424
 
425
  $response['jwt'] = array(
426
  'token' => $jwt->token,
application/Service/LoginRedirect.php CHANGED
@@ -5,15 +5,17 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * Login Redirect service
14
  *
15
  * @package AAM
16
- * @version 6.0.0
 
 
 
 
17
  */
18
  class AAM_Service_LoginRedirect
19
  {
@@ -69,8 +71,11 @@ class AAM_Service_LoginRedirect
69
  *
70
  * @return void
71
  *
 
 
 
72
  * @access protected
73
- * @version 6.0.0
74
  */
75
  protected function initializeHooks()
76
  {
@@ -79,6 +84,38 @@ class AAM_Service_LoginRedirect
79
 
80
  // WP Core login redirect hook
81
  add_filter('login_redirect', array($this, 'getLoginRedirect'), 10, 3);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  }
83
 
84
  /**
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
11
  * Login Redirect service
12
  *
13
  * @package AAM
14
+ *
15
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
16
+ * @since 6.0.0 Initial implementation of the class
17
+ *
18
+ * @version 6.4.0
19
  */
20
  class AAM_Service_LoginRedirect
21
  {
71
  *
72
  * @return void
73
  *
74
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
75
+ * @since 6.0.0 Initial implementation of the method
76
+ *
77
  * @access protected
78
+ * @version 6.4.0
79
  */
80
  protected function initializeHooks()
81
  {
84
 
85
  // WP Core login redirect hook
86
  add_filter('login_redirect', array($this, 'getLoginRedirect'), 10, 3);
87
+
88
+ // Policy generation hook
89
+ add_filter(
90
+ 'aam_generated_policy_filter', array($this, 'generatePolicy'), 10, 4
91
+ );
92
+ }
93
+
94
+ /**
95
+ * Generate Login Redirect policy params
96
+ *
97
+ * @param array $policy
98
+ * @param string $resource_type
99
+ * @param array $options
100
+ * @param AAM_Core_Policy_Generator $generator
101
+ *
102
+ * @return array
103
+ *
104
+ * @access public
105
+ * @version 6.4.0
106
+ */
107
+ public function generatePolicy($policy, $resource_type, $options, $generator)
108
+ {
109
+ if ($resource_type === AAM_Core_Object_LoginRedirect::OBJECT_TYPE) {
110
+ if (!empty($options)) {
111
+ $policy['Param'] = array_merge(
112
+ $policy['Param'],
113
+ $generator->generateRedirectParam($options, 'login')
114
+ );
115
+ }
116
+ }
117
+
118
+ return $policy;
119
  }
120
 
121
  /**
application/Service/LogoutRedirect.php CHANGED
@@ -10,13 +10,14 @@
10
  /**
11
  * Logout Redirect service
12
  *
 
13
  * @since 6.1.0 Fixed bug where white screen occurs if "Default" option is
14
  * explicitly selected
15
  * @since 6.0.5 Fixed the bug with logout redirect
16
  * @since 6.0.0 Initial implementation of the class
17
  *
18
  * @package AAM
19
- * @version 6.1.0
20
  */
21
  class AAM_Service_LogoutRedirect
22
  {
@@ -81,6 +82,7 @@ class AAM_Service_LogoutRedirect
81
  *
82
  * @return void
83
  *
 
84
  * @since 6.1.0 Fixed bug where white screen occurs if "Default" option is
85
  * explicitly selected
86
  * @since 6.0.5 Fixed bug where user was not redirected properly after logout
@@ -88,7 +90,7 @@ class AAM_Service_LogoutRedirect
88
  * @since 6.0.0 Initial implementation of the method
89
  *
90
  * @access protected
91
- * @version 6.1.0
92
  */
93
  protected function initializeHooks()
94
  {
@@ -119,6 +121,38 @@ class AAM_Service_LogoutRedirect
119
  exit;
120
  }
121
  }, PHP_INT_MAX);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  }
123
 
124
  }
10
  /**
11
  * Logout Redirect service
12
  *
13
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
14
  * @since 6.1.0 Fixed bug where white screen occurs if "Default" option is
15
  * explicitly selected
16
  * @since 6.0.5 Fixed the bug with logout redirect
17
  * @since 6.0.0 Initial implementation of the class
18
  *
19
  * @package AAM
20
+ * @version 6.4.0
21
  */
22
  class AAM_Service_LogoutRedirect
23
  {
82
  *
83
  * @return void
84
  *
85
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
86
  * @since 6.1.0 Fixed bug where white screen occurs if "Default" option is
87
  * explicitly selected
88
  * @since 6.0.5 Fixed bug where user was not redirected properly after logout
90
  * @since 6.0.0 Initial implementation of the method
91
  *
92
  * @access protected
93
+ * @version 6.4.0
94
  */
95
  protected function initializeHooks()
96
  {
121
  exit;
122
  }
123
  }, PHP_INT_MAX);
124
+
125
+ // Policy generation hook
126
+ add_filter(
127
+ 'aam_generated_policy_filter', array($this, 'generatePolicy'), 10, 4
128
+ );
129
+ }
130
+
131
+ /**
132
+ * Generate Logout Redirect policy params
133
+ *
134
+ * @param array $policy
135
+ * @param string $resource_type
136
+ * @param array $options
137
+ * @param AAM_Core_Policy_Generator $generator
138
+ *
139
+ * @return array
140
+ *
141
+ * @access public
142
+ * @version 6.4.0
143
+ */
144
+ public function generatePolicy($policy, $resource_type, $options, $generator)
145
+ {
146
+ if ($resource_type === AAM_Core_Object_LogoutRedirect::OBJECT_TYPE) {
147
+ if (!empty($options)) {
148
+ $policy['Param'] = array_merge(
149
+ $policy['Param'],
150
+ $generator->generateRedirectParam($options, 'logout')
151
+ );
152
+ }
153
+ }
154
+
155
+ return $policy;
156
  }
157
 
158
  }
application/Service/Metabox.php CHANGED
@@ -5,15 +5,17 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * Metaboxes & Widgets service
14
  *
 
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Service_Metabox
19
  {
@@ -65,8 +67,11 @@ class AAM_Service_Metabox
65
  *
66
  * @return void
67
  *
 
 
 
68
  * @access protected
69
- * @version 6.0.0
70
  */
71
  protected function initializeHooks()
72
  {
@@ -106,6 +111,51 @@ class AAM_Service_Metabox
106
  // Widget filters
107
  add_filter('sidebars_widgets', array($this, 'filterWidgets'), 999);
108
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  }
110
 
111
  /**
@@ -142,11 +192,14 @@ class AAM_Service_Metabox
142
  *
143
  * @param string $screen
144
  *
145
- * @access public
 
 
 
146
  * @global array $wp_meta_boxes
147
  * @version 6.0.0
148
  */
149
- public function filterBackend($screen)
150
  {
151
  global $wp_meta_boxes;
152
 
@@ -162,13 +215,16 @@ class AAM_Service_Metabox
162
  /**
163
  * Filter of widgets on the Appearance->Widgets screen
164
  *
165
- * @access public
 
 
 
166
  *
167
  * @return void
168
  * @global array $wp_registered_widgets
169
  * @version 6.0.0
170
  */
171
- public function filterAppearanceWidgets()
172
  {
173
  global $wp_registered_widgets;
174
 
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
11
  * Metaboxes & Widgets service
12
  *
13
+ * @since 6.4.0 Made couple method protected.
14
+ * Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
15
+ * @since 6.0.0 Initial implementation of the class
16
+ *
17
  * @package AAM
18
+ * @version 6.4.0
19
  */
20
  class AAM_Service_Metabox
21
  {
67
  *
68
  * @return void
69
  *
70
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
71
+ * @since 6.0.0 Initial implementation of the method
72
+ *
73
  * @access protected
74
+ * @version 6.4.0
75
  */
76
  protected function initializeHooks()
77
  {
111
  // Widget filters
112
  add_filter('sidebars_widgets', array($this, 'filterWidgets'), 999);
113
  }
114
+
115
+ // Policy generation hook
116
+ add_filter(
117
+ 'aam_generated_policy_filter', array($this, 'generatePolicy'), 10, 4
118
+ );
119
+ }
120
+
121
+ /**
122
+ * Generate Metabox & Widget policy statements
123
+ *
124
+ * @param array $policy
125
+ * @param string $resource_type
126
+ * @param array $options
127
+ * @param AAM_Core_Policy_Generator $generator
128
+ *
129
+ * @return array
130
+ *
131
+ * @access public
132
+ * @version 6.4.0
133
+ */
134
+ public function generatePolicy($policy, $resource_type, $options, $generator)
135
+ {
136
+ if ($resource_type === AAM_Core_Object_Metabox::OBJECT_TYPE) {
137
+ if (!empty($options)) {
138
+ $metaboxes = $widgets = array();
139
+
140
+ foreach($options as $id => $effect) {
141
+ $parts = explode('|', $id);
142
+
143
+ if (in_array($parts[0], array('dashboard', 'widgets'), true)) {
144
+ $widgets[$id] = !empty($effect);
145
+ } else {
146
+ $metaboxes[$id] = !empty($effect);
147
+ }
148
+ }
149
+
150
+ $policy['Statement'] = array_merge(
151
+ $policy['Statement'],
152
+ $generator->generateBasicStatements($widgets, 'Widget'),
153
+ $generator->generateBasicStatements($metaboxes, 'Metabox')
154
+ );
155
+ }
156
+ }
157
+
158
+ return $policy;
159
  }
160
 
161
  /**
192
  *
193
  * @param string $screen
194
  *
195
+ * @since 6.4.0 Making the method protected
196
+ * @since 6.0.0 Initial implementation of the method
197
+ *
198
+ * @access protected
199
  * @global array $wp_meta_boxes
200
  * @version 6.0.0
201
  */
202
+ protected function filterBackend($screen)
203
  {
204
  global $wp_meta_boxes;
205
 
215
  /**
216
  * Filter of widgets on the Appearance->Widgets screen
217
  *
218
+ * @access protected
219
+ *
220
+ * @since 6.4.0 Making the method protected
221
+ * @since 6.0.0 Initial implementation of the method
222
  *
223
  * @return void
224
  * @global array $wp_registered_widgets
225
  * @version 6.0.0
226
  */
227
+ protected function filterAppearanceWidgets()
228
  {
229
  global $wp_registered_widgets;
230
 
application/Service/NotFoundRedirect.php CHANGED
@@ -5,15 +5,17 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * 404 redirect service
14
  *
 
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Service_NotFoundRedirect
19
  {
@@ -68,12 +70,20 @@ class AAM_Service_NotFoundRedirect
68
  *
69
  * @return void
70
  *
 
 
 
71
  * @access protected
72
- * @version 6.0.0
73
  */
74
  protected function initializeHooks()
75
  {
76
  add_action('wp', array($this, 'wp'));
 
 
 
 
 
77
  }
78
 
79
  /**
@@ -81,24 +91,62 @@ class AAM_Service_NotFoundRedirect
81
  *
82
  * @return void
83
  *
 
 
 
84
  * @access public
85
  * @global WP_Post $post
86
- * @version 6.0.0
87
  */
88
  public function wp()
89
  {
90
  global $wp_query;
91
 
92
  if ($wp_query->is_404) { // Handle 404 redirect
93
- $type = AAM_Core_Config::get('frontend.404redirect.type', 'default');
 
 
 
 
 
 
 
 
94
 
95
  if ($type !== 'default') {
96
  AAM_Core_Redirect::execute(
97
  $type,
98
- array($type => AAM_Core_Config::get("frontend.404redirect.{$type}"))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  );
100
  }
101
  }
 
 
102
  }
103
 
104
  }
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
11
  * 404 redirect service
12
  *
13
+ * @since 6.4.0 Refactored to use 404 object instead of AAM config
14
+ * Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
15
+ * @since 6.0.0 Initial implementation of the service
16
+ *
17
  * @package AAM
18
+ * @version 6.4.0
19
  */
20
  class AAM_Service_NotFoundRedirect
21
  {
70
  *
71
  * @return void
72
  *
73
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
74
+ * @since 6.0.0 Initial implementation of the method
75
+ *
76
  * @access protected
77
+ * @version 6.4.0
78
  */
79
  protected function initializeHooks()
80
  {
81
  add_action('wp', array($this, 'wp'));
82
+
83
+ // Policy generation hook
84
+ add_filter(
85
+ 'aam_generated_policy_filter', array($this, 'generatePolicy'), 10, 4
86
+ );
87
  }
88
 
89
  /**
91
  *
92
  * @return void
93
  *
94
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/64
95
+ * @since 6.0.0 Initial implementation of the method
96
+ *
97
  * @access public
98
  * @global WP_Post $post
99
+ * @version 6.4.0
100
  */
101
  public function wp()
102
  {
103
  global $wp_query;
104
 
105
  if ($wp_query->is_404) { // Handle 404 redirect
106
+ $options = AAM::getUser()->getObject(
107
+ AAM_Core_Object_NotFoundRedirect::OBJECT_TYPE
108
+ )->getOption();
109
+
110
+ if (isset($options['404.redirect.type'])) {
111
+ $type = $options['404.redirect.type'];
112
+ } else {
113
+ $type = 'default';
114
+ }
115
 
116
  if ($type !== 'default') {
117
  AAM_Core_Redirect::execute(
118
  $type,
119
+ array($type => $options["404.redirect.{$type}"])
120
+ );
121
+ }
122
+ }
123
+ }
124
+
125
+ /**
126
+ * Generate 404 (Not Found) Redirect policy params
127
+ *
128
+ * @param array $policy
129
+ * @param string $resource_type
130
+ * @param array $options
131
+ * @param AAM_Core_Policy_Generator $generator
132
+ *
133
+ * @return array
134
+ *
135
+ * @access public
136
+ * @version 6.4.0
137
+ */
138
+ public function generatePolicy($policy, $resource_type, $options, $generator)
139
+ {
140
+ if ($resource_type === AAM_Core_Object_NotFoundRedirect::OBJECT_TYPE) {
141
+ if (!empty($options)) {
142
+ $policy['Param'] = array_merge(
143
+ $policy['Param'],
144
+ $generator->generateRedirectParam($options, '404')
145
  );
146
  }
147
  }
148
+
149
+ return $policy;
150
  }
151
 
152
  }
application/Service/Route.php CHANGED
@@ -5,20 +5,31 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * API Route service
14
  *
 
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Service_Route
19
  {
20
  use AAM_Core_Contract_ServiceTrait;
21
 
 
 
 
 
 
 
 
 
 
22
  /**
23
  * AAM configuration setting that is associated with the service
24
  *
@@ -68,8 +79,12 @@ class AAM_Service_Route
68
  *
69
  * @return void
70
  *
 
 
 
 
71
  * @access protected
72
- * @version 6.0.0
73
  */
74
  protected function initializeHooks()
75
  {
@@ -120,8 +135,48 @@ class AAM_Service_Route
120
  PHP_INT_MAX
121
  );
122
 
123
- //register API manager is applicable
124
  add_action('parse_request', array($this, 'registerRouteControllers'), 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  }
126
 
127
  /**
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
11
  * API Route service
12
  *
13
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
14
+ * Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
15
+ * @since 6.0.0 Initial implementation of the class
16
+ *
17
  * @package AAM
18
+ * @version 6.4.0
19
  */
20
  class AAM_Service_Route
21
  {
22
  use AAM_Core_Contract_ServiceTrait;
23
 
24
+ /**
25
+ * Service alias
26
+ *
27
+ * Is used to get service instance if it is enabled
28
+ *
29
+ * @version 6.4.0
30
+ */
31
+ const SERVICE_ALIAS = 'api-route';
32
+
33
  /**
34
  * AAM configuration setting that is associated with the service
35
  *
79
  *
80
  * @return void
81
  *
82
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
83
+ * Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
84
+ * @since 6.0.0 Initial implementation of the method
85
+ *
86
  * @access protected
87
+ * @version 6.4.0
88
  */
89
  protected function initializeHooks()
90
  {
135
  PHP_INT_MAX
136
  );
137
 
138
+ // Register API manager is applicable
139
  add_action('parse_request', array($this, 'registerRouteControllers'), 1);
140
+
141
+ // Policy generation hook
142
+ add_filter(
143
+ 'aam_generated_policy_filter', array($this, 'generatePolicy'), 10, 4
144
+ );
145
+
146
+ // Service fetch
147
+ $this->registerService();
148
+ }
149
+
150
+ /**
151
+ * Generate API Route policy statements
152
+ *
153
+ * @param array $policy
154
+ * @param string $resource_type
155
+ * @param array $options
156
+ * @param AAM_Core_Policy_Generator $generator
157
+ *
158
+ * @return array
159
+ *
160
+ * @access public
161
+ * @version 6.4.0
162
+ */
163
+ public function generatePolicy($policy, $resource_type, $options, $generator)
164
+ {
165
+ if ($resource_type === AAM_Core_Object_Route::OBJECT_TYPE) {
166
+ if (!empty($options)) {
167
+ $normalized = array();
168
+ foreach($options as $id => $effect) {
169
+ $normalized[str_replace('|', ':', $id)] = !empty($effect);
170
+ }
171
+
172
+ $policy['Statement'] = array_merge(
173
+ $policy['Statement'],
174
+ $generator->generateBasicStatements($normalized, 'Route')
175
+ );
176
+ }
177
+ }
178
+
179
+ return $policy;
180
  }
181
 
182
  /**
application/Service/SecureLogin.php CHANGED
@@ -10,18 +10,29 @@
10
  /**
11
  * Secure Login service
12
  *
 
 
13
  * @since 6.3.1 Fixed bug with not being able to lock user
14
  * @since 6.1.0 Enriched error response with more details
15
  * @since 6.0.0 Initial implementation of the class
16
  *
17
  * @package AAM
18
- * @version 6.3.1
19
  */
20
  class AAM_Service_SecureLogin
21
  {
22
  use AAM_Core_Contract_RequestTrait,
23
  AAM_Core_Contract_ServiceTrait;
24
 
 
 
 
 
 
 
 
 
 
25
  /**
26
  * AAM configuration setting that is associated with the service
27
  *
@@ -71,8 +82,11 @@ class AAM_Service_SecureLogin
71
  *
72
  * @return void
73
  *
 
 
 
74
  * @access protected
75
- * @version 6.0.0
76
  */
77
  protected function initializeHooks()
78
  {
@@ -121,6 +135,9 @@ class AAM_Service_SecureLogin
121
  wp_logout();
122
  }
123
  });
 
 
 
124
  }
125
 
126
  /**
@@ -170,11 +187,12 @@ class AAM_Service_SecureLogin
170
  *
171
  * @return WP_REST_Response
172
  *
 
173
  * @since 6.1.0 Enriched error response with more details
174
  * @since 6.0.0 Initial implementation of the method
175
  *
176
  * @access public
177
- * @version 6.1.0
178
  */
179
  public function authenticate(WP_REST_Request $request)
180
  {
@@ -191,16 +209,23 @@ class AAM_Service_SecureLogin
191
  'remember' => $request->get_param('remember')
192
  ));
193
 
194
- if (!is_wp_error($user)) {
195
- $result = apply_filters('aam_auth_response_filter', array(
196
- 'user' => $user,
197
- 'redirect' => $request->get_param('redirect')
198
- ), $request);
199
- } else {
200
- $status = 403;
 
 
 
 
 
 
 
 
201
  $result = array(
202
- 'code' => $user->get_error_code(),
203
- 'reason' => $user->get_error_message()
204
  );
205
  }
206
 
10
  /**
11
  * Secure Login service
12
  *
13
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/16.
14
+ * Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
15
  * @since 6.3.1 Fixed bug with not being able to lock user
16
  * @since 6.1.0 Enriched error response with more details
17
  * @since 6.0.0 Initial implementation of the class
18
  *
19
  * @package AAM
20
+ * @version 6.4.0
21
  */
22
  class AAM_Service_SecureLogin
23
  {
24
  use AAM_Core_Contract_RequestTrait,
25
  AAM_Core_Contract_ServiceTrait;
26
 
27
+ /**
28
+ * Service alias
29
+ *
30
+ * Is used to get service instance if it is enabled
31
+ *
32
+ * @version 6.4.0
33
+ */
34
+ const SERVICE_ALIAS = 'secure-login';
35
+
36
  /**
37
  * AAM configuration setting that is associated with the service
38
  *
82
  *
83
  * @return void
84
  *
85
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
86
+ * @since 6.0.0 Initial implementation of the method
87
+ *
88
  * @access protected
89
+ * @version 6.4.0
90
  */
91
  protected function initializeHooks()
92
  {
135
  wp_logout();
136
  }
137
  });
138
+
139
+ // Service fetch
140
+ $this->registerService();
141
  }
142
 
143
  /**
187
  *
188
  * @return WP_REST_Response
189
  *
190
+ * @since 6.4.0 Enhanced to support https://github.com/aamplugin/advanced-access-manager/issues/16
191
  * @since 6.1.0 Enriched error response with more details
192
  * @since 6.0.0 Initial implementation of the method
193
  *
194
  * @access public
195
+ * @version 6.4.0
196
  */
197
  public function authenticate(WP_REST_Request $request)
198
  {
209
  'remember' => $request->get_param('remember')
210
  ));
211
 
212
+ try {
213
+ if (!is_wp_error($user)) {
214
+ $result = apply_filters('aam_auth_response_filter', array(
215
+ 'user' => $user,
216
+ 'redirect' => $request->get_param('redirect')
217
+ ), $request);
218
+ } else {
219
+ $status = 403;
220
+ $result = array(
221
+ 'code' => $user->get_error_code(),
222
+ 'reason' => $user->get_error_message()
223
+ );
224
+ }
225
+ } catch(Exception $e) {
226
+ $status = $e->getCode();
227
  $result = array(
228
+ 'reason' => $e->getMessage()
 
229
  );
230
  }
231
 
application/Service/Toolbar.php CHANGED
@@ -5,15 +5,16 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * Toolbar service
14
  *
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Service_Toolbar
19
  {
@@ -144,8 +145,11 @@ class AAM_Service_Toolbar
144
  *
145
  * @return void
146
  *
 
 
 
147
  * @access protected
148
- * @version 6.0.0
149
  */
150
  protected function initializeHooks()
151
  {
@@ -177,11 +181,43 @@ class AAM_Service_Toolbar
177
  );
178
  }
179
 
 
 
 
 
 
180
  add_action('aam_clear_settings_action', function() {
181
  AAM_Core_API::deleteOption(self::DB_OPTION);
182
  });
183
  }
184
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  }
186
 
187
  if (defined('AAM_KEY')) {
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
11
  * Toolbar service
12
  *
13
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
14
+ * @since 6.0.0 Initial implementation of the class
15
+ *
16
  * @package AAM
17
+ * @version 6.4.0
18
  */
19
  class AAM_Service_Toolbar
20
  {
145
  *
146
  * @return void
147
  *
148
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
149
+ * @since 6.0.0 Initial implementation of the method
150
+ *
151
  * @access protected
152
+ * @version 6.4.0
153
  */
154
  protected function initializeHooks()
155
  {
181
  );
182
  }
183
 
184
+ // Policy generation hook
185
+ add_filter(
186
+ 'aam_generated_policy_filter', array($this, 'generatePolicy'), 10, 4
187
+ );
188
+
189
  add_action('aam_clear_settings_action', function() {
190
  AAM_Core_API::deleteOption(self::DB_OPTION);
191
  });
192
  }
193
 
194
+ /**
195
+ * Generate Toolbar policy statements
196
+ *
197
+ * @param array $policy
198
+ * @param string $resource_type
199
+ * @param array $options
200
+ * @param AAM_Core_Policy_Generator $generator
201
+ *
202
+ * @return array
203
+ *
204
+ * @access public
205
+ * @version 6.4.0
206
+ */
207
+ public function generatePolicy($policy, $resource_type, $options, $generator)
208
+ {
209
+ if ($resource_type === AAM_Core_Object_Toolbar::OBJECT_TYPE) {
210
+ if (!empty($options)) {
211
+ $policy['Statement'] = array_merge(
212
+ $policy['Statement'],
213
+ $generator->generateBasicStatements($options, 'Toolbar')
214
+ );
215
+ }
216
+ }
217
+
218
+ return $policy;
219
+ }
220
+
221
  }
222
 
223
  if (defined('AAM_KEY')) {
application/Service/Uri.php CHANGED
@@ -10,13 +10,14 @@
10
  /**
11
  * URI access service
12
  *
 
13
  * @since 6.3.0 Fixed bug that causes PHP Notice if URI has not base
14
  * (e.g.`?something=1`)
15
  * @since 6.1.0 The `authorizeUri` returns true if no match found
16
  * @since 6.0.0 Initial implementation of the class
17
  *
18
  * @package AAM
19
- * @version 6.3.0
20
  */
21
  class AAM_Service_Uri
22
  {
@@ -72,12 +73,47 @@ class AAM_Service_Uri
72
  *
73
  * @return void
74
  *
 
 
 
75
  * @access protected
76
- * @version 6.0.0
77
  */
78
  protected function initializeHooks()
79
  {
80
  add_action('init', array($this, 'authorizeUri'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  }
82
 
83
  /**
10
  /**
11
  * URI access service
12
  *
13
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
14
  * @since 6.3.0 Fixed bug that causes PHP Notice if URI has not base
15
  * (e.g.`?something=1`)
16
  * @since 6.1.0 The `authorizeUri` returns true if no match found
17
  * @since 6.0.0 Initial implementation of the class
18
  *
19
  * @package AAM
20
+ * @version 6.4.0
21
  */
22
  class AAM_Service_Uri
23
  {
73
  *
74
  * @return void
75
  *
76
+ * @since 6.4.0 Fixed https://github.com/aamplugin/advanced-access-manager/issues/76
77
+ * @since 6.0.0 Initial implementation of the method
78
+ *
79
  * @access protected
80
+ * @version 6.4.0
81
  */
82
  protected function initializeHooks()
83
  {
84
  add_action('init', array($this, 'authorizeUri'));
85
+
86
+ // Policy generation hook
87
+ add_filter(
88
+ 'aam_generated_policy_filter', array($this, 'generatePolicy'), 10, 4
89
+ );
90
+ }
91
+
92
+ /**
93
+ * Generate URI policy statements
94
+ *
95
+ * @param array $policy
96
+ * @param string $resource_type
97
+ * @param array $options
98
+ * @param AAM_Core_Policy_Generator $generator
99
+ *
100
+ * @return array
101
+ *
102
+ * @access public
103
+ * @version 6.4.0
104
+ */
105
+ public function generatePolicy($policy, $resource_type, $options, $generator)
106
+ {
107
+ if ($resource_type === AAM_Core_Object_Uri::OBJECT_TYPE) {
108
+ if (!empty($options)) {
109
+ $policy['Statement'] = array_merge(
110
+ $policy['Statement'],
111
+ $generator->generateBasicStatements($options, 'URI')
112
+ );
113
+ }
114
+ }
115
+
116
+ return $policy;
117
  }
118
 
119
  /**
application/Service/UserLevelFilter.php CHANGED
@@ -5,20 +5,30 @@
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
8
- *
9
- * @version 6.0.0
10
  */
11
 
12
  /**
13
  * User Level Filter service
14
  *
 
 
 
15
  * @package AAM
16
- * @version 6.0.0
17
  */
18
  class AAM_Service_UserLevelFilter
19
  {
20
  use AAM_Core_Contract_ServiceTrait;
21
 
 
 
 
 
 
 
 
 
 
22
  /**
23
  * AAM configuration setting that is associated with the service
24
  *
@@ -61,8 +71,11 @@ class AAM_Service_UserLevelFilter
61
  *
62
  * @return void
63
  *
 
 
 
64
  * @access protected
65
- * @version 6.0.0
66
  */
67
  protected function initializeHooks()
68
  {
@@ -82,6 +95,9 @@ class AAM_Service_UserLevelFilter
82
  add_filter(
83
  'aam_user_can_manage_level_filter', array($this, 'isUserLevelAllowed'), 10, 2
84
  );
 
 
 
85
  }
86
 
87
  /**
5
  * LICENSE: This file is subject to the terms and conditions defined in *
6
  * file 'license.txt', which is part of this source code package. *
7
  * ======================================================================
 
 
8
  */
9
 
10
  /**
11
  * User Level Filter service
12
  *
13
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
14
+ * @since 6.0.0 Initial implementation of the class
15
+ *
16
  * @package AAM
17
+ * @version 6.4.0
18
  */
19
  class AAM_Service_UserLevelFilter
20
  {
21
  use AAM_Core_Contract_ServiceTrait;
22
 
23
+ /**
24
+ * Service alias
25
+ *
26
+ * Is used to get service instance if it is enabled
27
+ *
28
+ * @version 6.4.0
29
+ */
30
+ const SERVICE_ALIAS = 'user-level';
31
+
32
  /**
33
  * AAM configuration setting that is associated with the service
34
  *
71
  *
72
  * @return void
73
  *
74
+ * @since 6.4.0 Enhanced https://github.com/aamplugin/advanced-access-manager/issues/71
75
+ * @since 6.0.0 Initial implementation of the method
76
+ *
77
  * @access protected
78
+ * @version 6.4.0
79
  */
80
  protected function initializeHooks()
81
  {
95
  add_filter(
96
  'aam_user_can_manage_level_filter', array($this, 'isUserLevelAllowed'), 10, 2
97
  );
98
+
99
+ // Service fetch
100
+ $this->registerService();
101
  }
102
 
103
  /**
lang/advanced-access-manager-en_US.mo CHANGED
Binary file
lang/advanced-access-manager-en_US.po CHANGED
@@ -1,7 +1,7 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Advanced Access Manager\n"
4
- "POT-Creation-Date: 2020-01-26 15:20-0500\n"
5
  "PO-Revision-Date: \n"
6
  "Last-Translator: \n"
7
  "Language-Team: AAMPlugin <support@aamplugin.com>\n"
@@ -9,7 +9,7 @@ msgstr ""
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.2.4\n"
13
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
14
  "X-Poedit-SourceCharset: UTF-8\n"
15
  "X-Poedit-KeywordsList: __;preparePhrase\n"
@@ -52,8 +52,8 @@ msgid ""
52
  "future premium addons will be included for now additional cost."
53
  msgstr ""
54
 
55
- #: application/Backend/Feature/Main/404Redirect.php:71
56
- #: application/Service/NotFoundRedirect.php:52
57
  msgid "404 Redirect"
58
  msgstr ""
59
 
@@ -77,7 +77,7 @@ msgstr ""
77
 
78
  #: application/Backend/Feature/Main/Capability.php:337
79
  #: application/Backend/Feature/Main/Capability.php:360
80
- #: application/Backend/Feature/Main/Post.php:335
81
  #: application/Backend/tmpl/partial/post-access-form.php:81
82
  msgid "Backend"
83
  msgstr ""
@@ -93,7 +93,7 @@ msgid "Miscellaneous"
93
  msgstr ""
94
 
95
  #: application/Backend/Feature/Main/Capability.php:383
96
- #: application/Service/Capability.php:52
97
  msgid "Capabilities"
98
  msgstr ""
99
 
@@ -109,17 +109,17 @@ msgstr ""
109
  msgid "Token is no longer valid"
110
  msgstr ""
111
 
112
- #: application/Backend/Feature/Main/Jwt.php:227 application/Service/Jwt.php:63
113
  msgid "JWT Tokens"
114
  msgstr ""
115
 
116
  #: application/Backend/Feature/Main/LoginRedirect.php:75
117
- #: application/Service/LoginRedirect.php:52
118
  msgid "Login Redirect"
119
  msgstr ""
120
 
121
  #: application/Backend/Feature/Main/LogoutRedirect.php:75
122
- #: application/Service/LogoutRedirect.php:65
123
  msgid "Logout Redirect"
124
  msgstr ""
125
 
@@ -128,11 +128,12 @@ msgid "Backend Menu"
128
  msgstr ""
129
 
130
  #: application/Backend/Feature/Main/Metabox.php:264
131
- #: application/Service/Metabox.php:42
132
  msgid "Metaboxes & Widgets"
133
  msgstr ""
134
 
135
  #: application/Backend/Feature/Main/Policy.php:103
 
136
  msgid "Generate Access Policy"
137
  msgstr ""
138
 
@@ -146,70 +147,70 @@ msgid "Failed applying to %s"
146
  msgstr ""
147
 
148
  #: application/Backend/Feature/Main/Policy.php:519
149
- #: application/Service/AccessPolicy.php:69
150
- #: application/Service/AccessPolicy.php:184
151
  msgid "Access Policies"
152
  msgstr ""
153
 
154
- #: application/Backend/Feature/Main/Post.php:253
155
  msgid "307 - Temporary Redirect (Default)"
156
  msgstr ""
157
 
158
- #: application/Backend/Feature/Main/Post.php:254
159
  #: application/Backend/tmpl/service/uri.php:95
160
  msgid "301 - Moved Permanently"
161
  msgstr ""
162
 
163
- #: application/Backend/Feature/Main/Post.php:255
164
  #: application/Backend/tmpl/service/uri.php:97
165
  msgid "303 - See Other"
166
  msgstr ""
167
 
168
- #: application/Backend/Feature/Main/Post.php:332
169
  #: application/Backend/tmpl/partial/post-access-form.php:70
170
  msgid "Frontend"
171
  msgstr ""
172
 
173
- #: application/Backend/Feature/Main/Post.php:338
174
  #: application/Backend/tmpl/partial/post-access-form.php:92
175
  msgid "RESTful API"
176
  msgstr ""
177
 
178
- #: application/Backend/Feature/Main/Post.php:344
179
  msgid "All Areas"
180
  msgstr ""
181
 
182
- #: application/Backend/Feature/Main/Post.php:394
183
  #, php-format
184
  msgid "%d times"
185
  msgstr ""
186
 
187
- #: application/Backend/Feature/Main/Post.php:416
188
  #, php-format
189
  msgid "\"%s\" page"
190
  msgstr ""
191
 
192
- #: application/Backend/Feature/Main/Post.php:422
193
  #, php-format
194
  msgid "%s URL"
195
  msgstr ""
196
 
197
- #: application/Backend/Feature/Main/Post.php:426
198
  msgid "Login page"
199
  msgstr ""
200
 
201
- #: application/Backend/Feature/Main/Post.php:1110
202
- #: application/Service/Content.php:94
203
  msgid "Posts & Terms"
204
  msgstr ""
205
 
206
  #: application/Backend/Feature/Main/Redirect.php:75
207
- #: application/Service/DeniedRedirect.php:63
208
  msgid "Access Denied Redirect"
209
  msgstr ""
210
 
211
  #: application/Backend/Feature/Main/Route.php:118
212
- #: application/Service/Route.php:52
213
  msgid "API Routes"
214
  msgstr ""
215
 
@@ -217,7 +218,7 @@ msgstr ""
217
  msgid "Toolbar"
218
  msgstr ""
219
 
220
- #: application/Backend/Feature/Main/Uri.php:146 application/Service/Uri.php:56
221
  msgid "URI Access"
222
  msgstr ""
223
 
@@ -306,15 +307,15 @@ msgstr ""
306
  msgid "Services"
307
  msgstr ""
308
 
309
- #: application/Backend/Feature/Subject/Role.php:119
310
- #: application/Backend/Feature/Subject/Role.php:191
311
- #: application/Backend/Feature/Subject/Role.php:276
312
- #: application/Backend/Feature/Subject/Role.php:302
313
  #: application/Backend/Feature/Subject/User.php:80
314
  msgid "Unauthorized operation"
315
  msgstr ""
316
 
317
- #: application/Backend/Feature/Subject/Role.php:299
318
  msgid "Failed to delete the role"
319
  msgstr ""
320
 
@@ -324,7 +325,7 @@ msgstr ""
324
 
325
  #: application/Backend/Feature/Subject/User.php:225
326
  #: application/Backend/Feature/Subject/User.php:250
327
- #: application/Backend/View/Localization.php:151 media/js/aam.js:5190
328
  msgid "Unexpected application error"
329
  msgstr ""
330
 
@@ -344,19 +345,19 @@ msgstr ""
344
  msgid "You are not allowed to manage any AAM subject"
345
  msgstr ""
346
 
347
- #: application/Backend/View/Localization.php:38 media/js/aam.js:2238
348
  msgid "Search Capability"
349
  msgstr ""
350
 
351
- #: application/Backend/View/Localization.php:39 media/js/aam.js:2239
352
  msgid "_TOTAL_ capability(s)"
353
  msgstr ""
354
 
355
- #: application/Backend/View/Localization.php:40 media/js/aam.js:406
356
- #: media/js/aam.js:467 media/js/aam.js:1027 media/js/aam.js:2386
357
- #: media/js/aam.js:2428 media/js/aam.js:2692 media/js/aam.js:2713
358
- #: media/js/aam.js:2732 media/js/aam.js:2802 media/js/aam.js:2824
359
- #: media/js/aam.js:2843 media/js/aam.js:3745
360
  msgid "Saving..."
361
  msgstr ""
362
 
@@ -364,7 +365,7 @@ msgstr ""
364
  msgid "Execute Migration"
365
  msgstr ""
366
 
367
- #: application/Backend/View/Localization.php:42 media/js/aam.js:2394
368
  msgid "Failed to add new capability"
369
  msgstr ""
370
 
@@ -372,39 +373,39 @@ msgstr ""
372
  msgid "Application error"
373
  msgstr ""
374
 
375
- #: application/Backend/View/Localization.php:44 media/js/aam.js:2402
376
  msgid "Add Capability"
377
  msgstr ""
378
 
379
  #: application/Backend/View/Localization.php:45
380
- #: application/Backend/tmpl/service/capability.php:76 media/js/aam.js:2444
381
  msgid "Update Capability"
382
  msgstr ""
383
 
384
  #: application/Backend/View/Localization.php:46
385
  #: application/Backend/tmpl/service/menu.php:93
386
- #: application/Backend/tmpl/service/toolbar.php:70 media/js/aam.js:1722
387
- #: media/js/aam.js:1853
388
  msgid "Show Menu"
389
  msgstr ""
390
 
391
  #: application/Backend/View/Localization.php:47
392
  #: application/Backend/tmpl/service/menu.php:97
393
- #: application/Backend/tmpl/service/toolbar.php:74 media/js/aam.js:1732
394
- #: media/js/aam.js:1863
395
  msgid "Restrict Menu"
396
  msgstr ""
397
 
398
- #: application/Backend/View/Localization.php:48 media/js/aam.js:2033
399
  msgid "Failed to retrieve mataboxes"
400
  msgstr ""
401
 
402
- #: application/Backend/View/Localization.php:49 media/js/aam.js:2925
403
- #: media/js/aam.js:3630 media/js/aam.js:3829 media/js/aam.js:4057
404
  msgid "Search"
405
  msgstr ""
406
 
407
- #: application/Backend/View/Localization.php:50 media/js/aam.js:2926
408
  msgid "_TOTAL_ object(s)"
409
  msgstr ""
410
 
@@ -413,7 +414,7 @@ msgid "Failed"
413
  msgstr ""
414
 
415
  #: application/Backend/View/Localization.php:52 media/js/aam.js:60
416
- #: media/js/aam.js:4810
417
  msgid "Loading..."
418
  msgstr ""
419
 
@@ -434,11 +435,11 @@ msgid "_TOTAL_ role(s)"
434
  msgstr ""
435
 
436
  #: application/Backend/View/Localization.php:57
437
- #: application/Backend/tmpl/page/subject-panel-advanced.php:19
438
  #: application/Backend/tmpl/service/capability.php:30
439
  #: application/Backend/tmpl/service/capability.php:64
440
- #: application/Backend/tmpl/service/jwt.php:84 media/js/aam.js:1391
441
- #: media/js/aam.js:3840 media/js/aam.js:4072 media/js/aam.js:4156
442
  msgid "Create"
443
  msgstr ""
444
 
@@ -455,20 +456,20 @@ msgstr ""
455
  msgid "Add Role"
456
  msgstr ""
457
 
458
- #: application/Backend/View/Localization.php:61 media/js/aam.js:474
459
  msgid "Failed to update role"
460
  msgstr ""
461
 
462
  #: application/Backend/View/Localization.php:62
463
- #: application/Backend/tmpl/page/subject-panel-advanced.php:41
464
- #: application/Backend/tmpl/service/capability.php:90 media/js/aam.js:483
465
  msgid "Update"
466
  msgstr ""
467
 
468
  #: application/Backend/View/Localization.php:63
469
- #: application/Backend/tmpl/page/subject-panel-advanced.php:110
470
  #: application/Backend/tmpl/partial/post-access-form.php:156
471
- #: media/js/aam.js:1074 media/js/aam.js:2786
472
  msgid "Reset"
473
  msgstr ""
474
 
@@ -476,104 +477,104 @@ msgstr ""
476
  msgid "Update..."
477
  msgstr ""
478
 
479
- #: application/Backend/View/Localization.php:65 media/js/aam.js:506
480
- #: media/js/aam.js:1288 media/js/aam.js:2187 media/js/aam.js:3784
481
- #: media/js/aam.js:4174
482
  msgid "Deleting..."
483
  msgstr ""
484
 
485
- #: application/Backend/View/Localization.php:66 media/js/aam.js:512
486
  msgid "Failed to delete role"
487
  msgstr ""
488
 
489
  #: application/Backend/View/Localization.php:67
490
- #: application/Backend/tmpl/page/subject-panel-advanced.php:53
491
  msgid "Delete Role"
492
  msgstr ""
493
 
494
- #: application/Backend/View/Localization.php:68 media/js/aam.js:606
495
  msgid "Failed to lock user"
496
  msgstr ""
497
 
498
- #: application/Backend/View/Localization.php:69 media/js/aam.js:698
499
  msgid "Search user"
500
  msgstr ""
501
 
502
- #: application/Backend/View/Localization.php:70 media/js/aam.js:2775
503
  msgid "Counter was reset successfully"
504
  msgstr ""
505
 
506
- #: application/Backend/View/Localization.php:71 media/js/aam.js:699
507
  msgid "_TOTAL_ user(s)"
508
  msgstr ""
509
 
510
- #: application/Backend/View/Localization.php:72 media/js/aam.js:714
511
  msgid "Create New User"
512
  msgstr ""
513
 
514
  #: application/Backend/View/Localization.php:73
515
- #: application/Backend/tmpl/page/subject-panel.php:45 media/js/aam.js:760
516
- #: media/js/aam.js:1523
517
  msgid "Role"
518
  msgstr ""
519
 
520
- #: application/Backend/View/Localization.php:74 media/js/aam.js:4625
521
  msgid "Message has been sent"
522
  msgstr ""
523
 
524
  #: application/Backend/View/Localization.php:75
525
- #: application/Backend/tmpl/metabox/main-iframe.php:159 media/js/aam.js:4542
526
  msgid "Download Exported Settings"
527
  msgstr ""
528
 
529
  #: application/Backend/View/Localization.php:76
530
- #: application/Core/Subject/Default.php:36 media/js/aam.js:1187
531
  msgid "All Users, Roles and Visitor"
532
  msgstr ""
533
 
534
- #: application/Backend/View/Localization.php:77 media/js/aam.js:1158
535
- #: media/js/aam.js:1233 media/js/aam.js:4779
536
  msgid "Failed to apply policy changes"
537
  msgstr ""
538
 
539
  #: application/Backend/View/Localization.php:78
540
  #: application/Backend/tmpl/partial/visitor-principal-subject-tab.php:25
541
- #: media/js/aam.js:1152 media/js/aam.js:1161
542
  msgid "Attach Policy To Visitors"
543
  msgstr ""
544
 
545
  #: application/Backend/View/Localization.php:79
546
  #: application/Backend/tmpl/partial/visitor-principal-subject-tab.php:23
547
- #: media/js/aam.js:1150 media/js/aam.js:1163
548
  msgid "Detach Policy From Visitors"
549
  msgstr ""
550
 
551
- #: application/Backend/View/Localization.php:80 media/js/aam.js:645
552
- #: media/js/aam.js:3965
553
  msgid "Generating URL..."
554
  msgstr ""
555
 
556
  #: application/Backend/View/Localization.php:81
557
- #: application/Core/Subject/Visitor.php:43 media/js/aam.js:1113
558
  msgid "Anonymous"
559
  msgstr ""
560
 
561
- #: application/Backend/View/Localization.php:82 media/js/aam.js:1139
562
- #: media/js/aam.js:1214 media/js/aam.js:2053 media/js/aam.js:4454
563
- #: media/js/aam.js:4524
564
  msgid "Processing..."
565
  msgstr ""
566
 
567
- #: application/Backend/View/Localization.php:83 media/js/aam.js:723
568
  msgid "Loading roles..."
569
  msgstr ""
570
 
571
- #: application/Backend/View/Localization.php:84 media/js/aam.js:655
572
- #: media/js/aam.js:3976
573
  msgid "Failed to generate JWT token"
574
  msgstr ""
575
 
576
- #: application/Backend/View/Localization.php:85 media/js/aam.js:2155
577
  msgid "Failed to process request"
578
  msgstr ""
579
 
@@ -585,29 +586,30 @@ msgstr ""
585
  msgid "Current role"
586
  msgstr ""
587
 
588
- #: application/Backend/View/Localization.php:88 media/js/aam.js:3107
 
589
  msgid "Manage Access"
590
  msgstr ""
591
 
592
- #: application/Backend/View/Localization.php:89 media/js/aam.js:740
593
  msgid "Filter by role"
594
  msgstr ""
595
 
596
  #: application/Backend/View/Localization.php:90
597
- #: application/Backend/View/PostOptionList.php:82 media/js/aam.js:3119
598
  msgid "Edit"
599
  msgstr ""
600
 
601
  #: application/Backend/View/Localization.php:91
602
- #: application/Backend/tmpl/page/subject-panel-advanced.php:111
603
  #: application/Backend/tmpl/partial/post-access-form.php:105
604
  #: application/Backend/tmpl/partial/post-access-form.php:127
605
  #: application/Backend/tmpl/partial/post-access-form.php:157
606
  #: application/Backend/tmpl/partial/post-access-form.php:230
607
  #: application/Backend/tmpl/partial/post-access-form.php:251
608
  #: application/Backend/tmpl/partial/post-access-form.php:273
609
- #: application/Backend/tmpl/service/uri.php:108 media/js/aam.js:1041
610
- #: media/js/aam.js:3762
611
  msgid "Save"
612
  msgstr ""
613
 
@@ -615,263 +617,263 @@ msgstr ""
615
  msgid "Manage role"
616
  msgstr ""
617
 
618
- #: application/Backend/View/Localization.php:93 media/js/aam.js:234
619
  msgid "Edit role"
620
  msgstr ""
621
 
622
- #: application/Backend/View/Localization.php:94 media/js/aam.js:287
623
- #: media/js/aam.js:520
624
  msgid "Delete role"
625
  msgstr ""
626
 
627
- #: application/Backend/View/Localization.php:95 media/js/aam.js:258
628
  msgid "Clone role"
629
  msgstr ""
630
 
631
- #: application/Backend/View/Localization.php:96 media/js/aam.js:802
632
  msgid "Manage user"
633
  msgstr ""
634
 
635
- #: application/Backend/View/Localization.php:97 media/js/aam.js:851
636
  msgid "Edit user"
637
  msgstr ""
638
 
639
- #: application/Backend/View/Localization.php:98 media/js/aam.js:601
640
- #: media/js/aam.js:602 media/js/aam.js:872 media/js/aam.js:883
641
  msgid "Lock user"
642
  msgstr ""
643
 
644
- #: application/Backend/View/Localization.php:99 media/js/aam.js:595
645
- #: media/js/aam.js:596 media/js/aam.js:896 media/js/aam.js:907
646
  msgid "Unlock user"
647
  msgstr ""
648
 
649
- #: application/Backend/View/Localization.php:100 media/js/aam.js:2149
650
  msgid "WordPress core does not allow to grant this capability"
651
  msgstr ""
652
 
653
  #: application/Backend/View/Localization.php:101
654
  #: application/Backend/tmpl/partial/default-principal-subject-tab.php:15
655
- #: media/js/aam.js:1225 media/js/aam.js:1238
656
  msgid "Detach Policy From Everybody"
657
  msgstr ""
658
 
659
  #: application/Backend/View/Localization.php:102
660
  #: application/Backend/tmpl/partial/default-principal-subject-tab.php:17
661
- #: media/js/aam.js:1227 media/js/aam.js:1236
662
  msgid "Attach Policy To Everybody"
663
  msgstr ""
664
 
665
- #: application/Backend/View/Localization.php:103 media/js/aam.js:1379
666
  msgid "Search Policy"
667
  msgstr ""
668
 
669
- #: application/Backend/View/Localization.php:104 media/js/aam.js:1380
670
  msgid "_TOTAL_ Policies"
671
  msgstr ""
672
 
673
- #: application/Backend/View/Localization.php:105 media/js/aam.js:1422
674
  msgid "Apply Policy"
675
  msgstr ""
676
 
677
- #: application/Backend/View/Localization.php:106 media/js/aam.js:1442
678
  msgid "Revoke Policy"
679
  msgstr ""
680
 
681
  #: application/Backend/View/Localization.php:107
682
- #: application/Service/AccessPolicy.php:185 media/js/aam.js:1459
683
  msgid "Edit Policy"
684
  msgstr ""
685
 
686
  #: application/Backend/View/Localization.php:108
687
  #: application/Backend/tmpl/service/menu.php:79
688
- #: application/Backend/tmpl/service/toolbar.php:60 media/js/aam.js:1762
689
  msgid "Uncheck to allow"
690
  msgstr ""
691
 
692
  #: application/Backend/View/Localization.php:109
693
  #: application/Backend/tmpl/service/menu.php:79
694
- #: application/Backend/tmpl/service/toolbar.php:60 media/js/aam.js:1764
695
  msgid "Check to restrict"
696
  msgstr ""
697
 
698
  #: application/Backend/View/Localization.php:110
699
- #: application/Backend/tmpl/service/metabox.php:78 media/js/aam.js:1898
700
- #: media/js/aam.js:2087
701
  msgid "Uncheck to show"
702
  msgstr ""
703
 
704
  #: application/Backend/View/Localization.php:111
705
- #: application/Backend/tmpl/service/metabox.php:78 media/js/aam.js:1900
706
- #: media/js/aam.js:2089
707
  msgid "Check to hide"
708
  msgstr ""
709
 
710
  #: application/Backend/View/Localization.php:112
711
- #: application/Backend/tmpl/service/metabox.php:114 media/js/aam.js:2056
712
  msgid "Initialize"
713
  msgstr ""
714
 
715
- #: application/Backend/View/Localization.php:113 media/js/aam.js:2241
716
  msgid "No capabilities"
717
  msgstr ""
718
 
719
- #: application/Backend/View/Localization.php:114 media/js/aam.js:2947
720
  msgid "Post Type"
721
  msgstr ""
722
 
723
- #: application/Backend/View/Localization.php:115 media/js/aam.js:2952
724
  msgid "Hierarchical Taxonomy"
725
  msgstr ""
726
 
727
- #: application/Backend/View/Localization.php:116 media/js/aam.js:2957
728
  msgid "Hierarchical Term"
729
  msgstr ""
730
 
731
- #: application/Backend/View/Localization.php:117 media/js/aam.js:2962
732
  msgid "Tag Taxonomy"
733
  msgstr ""
734
 
735
- #: application/Backend/View/Localization.php:118 media/js/aam.js:2967
736
  msgid "Tag"
737
  msgstr ""
738
 
739
- #: application/Backend/View/Localization.php:119 media/js/aam.js:2978
740
  msgid "Customized Settings"
741
  msgstr ""
742
 
743
- #: application/Backend/View/Localization.php:120 media/js/aam.js:3048
744
- #: media/js/aam.js:3070
745
  msgid "Parent"
746
  msgstr ""
747
 
748
- #: application/Backend/View/Localization.php:121 media/js/aam.js:3093
749
  msgid "Drill-Down"
750
  msgstr ""
751
 
752
- #: application/Backend/View/Localization.php:122 media/js/aam.js:3631
753
  msgid "_TOTAL_ route(s)"
754
  msgstr ""
755
 
756
- #: application/Backend/View/Localization.php:123 media/js/aam.js:3633
757
  msgid "No API endpoints found. You might have APIs disabled."
758
  msgstr ""
759
 
760
- #: application/Backend/View/Localization.php:124 media/js/aam.js:3634
761
- #: media/js/aam.js:4061 media/js/aam.js:4412
762
  msgid "Nothing to show"
763
  msgstr ""
764
 
765
- #: application/Backend/View/Localization.php:125 media/js/aam.js:3753
766
  msgid "Failed to save URI rule"
767
  msgstr ""
768
 
769
- #: application/Backend/View/Localization.php:126 media/js/aam.js:3793
770
  msgid "Failed to delete URI rule"
771
  msgstr ""
772
 
773
- #: application/Backend/View/Localization.php:127 media/js/aam.js:3830
774
  msgid "_TOTAL_ URI(s)"
775
  msgstr ""
776
 
777
- #: application/Backend/View/Localization.php:128 media/js/aam.js:3871
778
  msgid "Edit Rule"
779
  msgstr ""
780
 
781
- #: application/Backend/View/Localization.php:129 media/js/aam.js:3883
782
  msgid "Delete Rule"
783
  msgstr ""
784
 
785
- #: application/Backend/View/Localization.php:130 media/js/aam.js:3898
786
  msgid "Denied"
787
  msgstr ""
788
 
789
- #: application/Backend/View/Localization.php:131 media/js/aam.js:3905
790
  msgid "Redirected"
791
  msgstr ""
792
 
793
- #: application/Backend/View/Localization.php:132 media/js/aam.js:3910
794
  msgid "Callback"
795
  msgstr ""
796
 
797
- #: application/Backend/View/Localization.php:133 media/js/aam.js:3915
798
  msgid "Allowed"
799
  msgstr ""
800
 
801
- #: application/Backend/View/Localization.php:134 media/js/aam.js:3961
802
  msgid "Generating token..."
803
  msgstr ""
804
 
805
- #: application/Backend/View/Localization.php:135 media/js/aam.js:4058
806
  msgid "_TOTAL_ token(s)"
807
  msgstr ""
808
 
809
- #: application/Backend/View/Localization.php:136 media/js/aam.js:4060
810
  msgid "No JWT tokens have been generated."
811
  msgstr ""
812
 
813
- #: application/Backend/View/Localization.php:137 media/js/aam.js:4104
814
  msgid "Delete Token"
815
  msgstr ""
816
 
817
- #: application/Backend/View/Localization.php:138 media/js/aam.js:4117
818
  msgid "View Token"
819
  msgstr ""
820
 
821
- #: application/Backend/View/Localization.php:139 media/js/aam.js:4142
822
  msgid "Creating..."
823
  msgstr ""
824
 
825
- #: application/Backend/View/Localization.php:140 media/js/aam.js:4409
826
  msgid "Search Service"
827
  msgstr ""
828
 
829
- #: application/Backend/View/Localization.php:141 media/js/aam.js:4410
830
  msgid "_TOTAL_ service(s)"
831
  msgstr ""
832
 
833
  #: application/Backend/View/Localization.php:142
834
  #: application/Backend/tmpl/settings/content.php:19
835
  #: application/Backend/tmpl/settings/core.php:16
836
- #: application/Backend/tmpl/settings/security.php:16 media/js/aam.js:4422
837
  msgid "Enabled"
838
  msgstr ""
839
 
840
  #: application/Backend/View/Localization.php:143
841
  #: application/Backend/tmpl/settings/content.php:19
842
  #: application/Backend/tmpl/settings/core.php:16
843
- #: application/Backend/tmpl/settings/security.php:16 media/js/aam.js:4422
844
  msgid "Disabled"
845
  msgstr ""
846
 
847
- #: application/Backend/View/Localization.php:144 media/js/aam.js:4460
848
  msgid "All settings has been cleared successfully"
849
  msgstr ""
850
 
851
  #: application/Backend/View/Localization.php:145
852
- #: application/Backend/tmpl/metabox/main-iframe.php:190 media/js/aam.js:4472
853
  msgid "Clear"
854
  msgstr ""
855
 
856
  #: application/Backend/View/Localization.php:146
857
- #: application/Backend/tmpl/page/subject-panel-advanced.php:102
858
- #: application/Backend/tmpl/partial/role-inheritance.php:7 media/js/aam.js:4815
859
  msgid "Select Role"
860
  msgstr ""
861
 
862
- #: application/Backend/View/Localization.php:147 media/js/aam.js:1570
863
  msgid "Policy is not assigned to anybody"
864
  msgstr ""
865
 
866
- #: application/Backend/View/Localization.php:148 media/js/aam.js:5110
867
  msgid "Data has been saved to clipboard"
868
  msgstr ""
869
 
870
- #: application/Backend/View/Localization.php:149 media/js/aam.js:5114
871
  msgid "Failed to save data to clipboard"
872
  msgstr ""
873
 
874
- #: application/Backend/View/Localization.php:150 media/js/aam.js:5186
875
  msgid "Operation completed successfully"
876
  msgstr ""
877
 
@@ -999,10 +1001,10 @@ msgid "Restrict access to edit the post."
999
  msgstr ""
1000
 
1001
  #: application/Backend/View/PostOptionList.php:87
1002
- #: application/Backend/tmpl/page/subject-panel-advanced.php:59
1003
  #: application/Backend/tmpl/service/jwt.php:136
1004
- #: application/Backend/tmpl/service/uri.php:130 media/js/aam.js:3802
1005
- #: media/js/aam.js:4188
1006
  msgid "Delete"
1007
  msgstr ""
1008
 
@@ -1060,18 +1062,18 @@ msgstr ""
1060
  #: application/Backend/tmpl/metabox/main-iframe.php:119
1061
  #: application/Backend/tmpl/metabox/main-iframe.php:173
1062
  #: application/Backend/tmpl/metabox/main-iframe.php:183
1063
- #: application/Backend/tmpl/page/addon-panel.php:81
1064
- #: application/Backend/tmpl/page/addon-panel.php:92
1065
- #: application/Backend/tmpl/page/addon-panel.php:102
1066
- #: application/Backend/tmpl/page/addon-panel.php:115
1067
- #: application/Backend/tmpl/page/subject-panel-advanced.php:8
1068
- #: application/Backend/tmpl/page/subject-panel-advanced.php:20
1069
- #: application/Backend/tmpl/page/subject-panel-advanced.php:30
1070
- #: application/Backend/tmpl/page/subject-panel-advanced.php:42
1071
- #: application/Backend/tmpl/page/subject-panel-advanced.php:52
1072
- #: application/Backend/tmpl/page/subject-panel-advanced.php:60
1073
- #: application/Backend/tmpl/page/subject-panel-advanced.php:70
1074
- #: application/Backend/tmpl/page/subject-panel-advanced.php:112
1075
  #: application/Backend/tmpl/partial/post-access-form.php:62
1076
  #: application/Backend/tmpl/partial/post-access-form.php:106
1077
  #: application/Backend/tmpl/partial/post-access-form.php:116
@@ -1222,7 +1224,7 @@ msgid ""
1222
  msgstr ""
1223
 
1224
  #: application/Backend/tmpl/metabox/main-iframe.php:204
1225
- #: application/Backend/tmpl/page/addon-panel.php:66
1226
  msgid "Read More"
1227
  msgstr ""
1228
 
@@ -1237,7 +1239,7 @@ msgstr ""
1237
  msgid "Syntax Error"
1238
  msgstr ""
1239
 
1240
- #: application/Backend/tmpl/page/addon-panel.php:16
1241
  msgid ""
1242
  "By purchasing any of the premium addon(s) below, you obtain the license that "
1243
  "allows you to install and use AAM software for one physical WordPress "
@@ -1248,66 +1250,66 @@ msgid ""
1248
  "guaranteed] within 30 day from the time of purchase."
1249
  msgstr ""
1250
 
1251
- #: application/Backend/tmpl/page/addon-panel.php:21
1252
  msgid "Download Addon"
1253
  msgstr ""
1254
 
1255
- #: application/Backend/tmpl/page/addon-panel.php:25
1256
  msgid "Enter The License Key"
1257
  msgstr ""
1258
 
1259
- #: application/Backend/tmpl/page/addon-panel.php:29
1260
  msgid "Download"
1261
  msgstr ""
1262
 
1263
- #: application/Backend/tmpl/page/addon-panel.php:37
1264
  msgid "Premium"
1265
  msgstr ""
1266
 
1267
- #: application/Backend/tmpl/page/addon-panel.php:38
1268
  msgid "Check For Updates"
1269
  msgstr ""
1270
 
1271
- #: application/Backend/tmpl/page/addon-panel.php:50
1272
- #: application/Backend/tmpl/page/addon-panel.php:52
1273
  msgid "License"
1274
  msgstr ""
1275
 
1276
- #: application/Backend/tmpl/page/addon-panel.php:52
1277
  msgid "unregistered version"
1278
  msgstr ""
1279
 
1280
- #: application/Backend/tmpl/page/addon-panel.php:60
1281
  msgid "Update Available"
1282
  msgstr ""
1283
 
1284
- #: application/Backend/tmpl/page/addon-panel.php:62
1285
  msgid "Active"
1286
  msgstr ""
1287
 
1288
- #: application/Backend/tmpl/page/addon-panel.php:64
1289
  msgid "Inactive"
1290
  msgstr ""
1291
 
1292
- #: application/Backend/tmpl/page/addon-panel.php:82
1293
  msgid "License Key Info"
1294
  msgstr ""
1295
 
1296
- #: application/Backend/tmpl/page/addon-panel.php:86
1297
  msgid ""
1298
  "Insert license key that you received after the payment (find the email "
1299
  "example below). It might take up to 2 hours to process the payment."
1300
  msgstr ""
1301
 
1302
- #: application/Backend/tmpl/page/addon-panel.php:103
1303
  msgid "Plugin Installation"
1304
  msgstr ""
1305
 
1306
- #: application/Backend/tmpl/page/addon-panel.php:107
1307
  msgid "The plugin has been successfully downloaded from our server."
1308
  msgstr ""
1309
 
1310
- #: application/Backend/tmpl/page/addon-panel.php:111
1311
  #, php-format
1312
  msgid ""
1313
  "With AAM v6.0.0 or higher, all premium addons are [regular WordPress "
@@ -1319,60 +1321,68 @@ msgstr ""
1319
  msgid "You are not allowed to manage any of the existing services."
1320
  msgstr ""
1321
 
1322
- #: application/Backend/tmpl/page/subject-panel-advanced.php:9
1323
  msgid "Create Role"
1324
  msgstr ""
1325
 
1326
- #: application/Backend/tmpl/page/subject-panel-advanced.php:13
1327
- #: application/Backend/tmpl/page/subject-panel-advanced.php:35
1328
  msgid "Role Name"
1329
  msgstr ""
1330
 
1331
- #: application/Backend/tmpl/page/subject-panel-advanced.php:14
1332
- #: application/Backend/tmpl/page/subject-panel-advanced.php:36
1333
  msgid "Enter Role Name"
1334
  msgstr ""
1335
 
1336
- #: application/Backend/tmpl/page/subject-panel-advanced.php:31
1337
  msgid "Update Role"
1338
  msgstr ""
1339
 
1340
- #: application/Backend/tmpl/page/subject-panel-advanced.php:56
 
 
 
 
 
 
 
 
1341
  #, php-format
1342
  msgid "Are you sure that you want to delete the %s role?"
1343
  msgstr ""
1344
 
1345
- #: application/Backend/tmpl/page/subject-panel-advanced.php:71
1346
  msgid "Manage User"
1347
  msgstr ""
1348
 
1349
- #: application/Backend/tmpl/page/subject-panel-advanced.php:74
1350
  msgid ""
1351
  "Define for how long user can access the website and what action needs to be "
1352
  "taken after access expires."
1353
  msgstr ""
1354
 
1355
- #: application/Backend/tmpl/page/subject-panel-advanced.php:83
1356
  msgid "Action After Expiration"
1357
  msgstr ""
1358
 
1359
- #: application/Backend/tmpl/page/subject-panel-advanced.php:86
1360
  msgid "Select Action"
1361
  msgstr ""
1362
 
1363
- #: application/Backend/tmpl/page/subject-panel-advanced.php:87
1364
  msgid "Logout User"
1365
  msgstr ""
1366
 
1367
- #: application/Backend/tmpl/page/subject-panel-advanced.php:88
1368
  msgid "Delete Account"
1369
  msgstr ""
1370
 
1371
- #: application/Backend/tmpl/page/subject-panel-advanced.php:89
1372
  msgid "Change User Role"
1373
  msgstr ""
1374
 
1375
- #: application/Backend/tmpl/page/subject-panel-advanced.php:100
1376
  msgid "Change To Role"
1377
  msgstr ""
1378
 
@@ -1411,15 +1421,15 @@ msgid ""
1411
  "default access settings."
1412
  msgstr ""
1413
 
1414
- #: application/Backend/tmpl/partial/access-policy-action.php:7
1415
  msgid "Download as File"
1416
  msgstr ""
1417
 
1418
- #: application/Backend/tmpl/partial/access-policy-action.php:8
1419
  msgid "Create New Policy"
1420
  msgstr ""
1421
 
1422
- #: application/Backend/tmpl/partial/access-policy-action.php:10
1423
  msgid "Learn More"
1424
  msgstr ""
1425
 
@@ -1481,6 +1491,7 @@ msgid ""
1481
  msgstr ""
1482
 
1483
  #: application/Backend/tmpl/partial/post-access-form.php:12
 
1484
  #: application/Backend/tmpl/service/login-redirect.php:17
1485
  #: application/Backend/tmpl/service/logout-redirect.php:17
1486
  #: application/Backend/tmpl/service/menu.php:17
@@ -1492,6 +1503,7 @@ msgid "Settings are customized"
1492
  msgstr ""
1493
 
1494
  #: application/Backend/tmpl/partial/post-access-form.php:13
 
1495
  #: application/Backend/tmpl/service/login-redirect.php:18
1496
  #: application/Backend/tmpl/service/logout-redirect.php:18
1497
  #: application/Backend/tmpl/service/menu.php:18
@@ -1575,7 +1587,7 @@ msgid ""
1575
  msgstr ""
1576
 
1577
  #: application/Backend/tmpl/partial/post-access-form.php:177
1578
- #: application/Backend/tmpl/service/404redirect.php:26
1579
  #: application/Backend/tmpl/service/login-redirect.php:33
1580
  #: application/Backend/tmpl/service/logout-redirect.php:33
1581
  #: application/Backend/tmpl/service/redirect.php:54
@@ -1597,7 +1609,7 @@ msgid ""
1597
  msgstr ""
1598
 
1599
  #: application/Backend/tmpl/partial/post-access-form.php:191
1600
- #: application/Backend/tmpl/service/404redirect.php:34
1601
  #: application/Backend/tmpl/service/login-redirect.php:41
1602
  #: application/Backend/tmpl/service/logout-redirect.php:41
1603
  #: application/Backend/tmpl/service/redirect.php:62
@@ -1608,7 +1620,7 @@ msgid "Trigger PHP callback function [(valid %sPHP callback%s is required)]"
1608
  msgstr ""
1609
 
1610
  #: application/Backend/tmpl/partial/post-access-form.php:195
1611
- #: application/Backend/tmpl/service/404redirect.php:38
1612
  #: application/Backend/tmpl/service/login-redirect.php:45
1613
  #: application/Backend/tmpl/service/logout-redirect.php:45
1614
  #: application/Backend/tmpl/service/redirect.php:71
@@ -1618,7 +1630,7 @@ msgid "Existing Page"
1618
  msgstr ""
1619
 
1620
  #: application/Backend/tmpl/partial/post-access-form.php:203
1621
- #: application/Backend/tmpl/service/404redirect.php:47
1622
  #: application/Backend/tmpl/service/login-redirect.php:54
1623
  #: application/Backend/tmpl/service/logout-redirect.php:54
1624
  #: application/Backend/tmpl/service/redirect.php:80
@@ -1628,7 +1640,7 @@ msgid "-- Select Page --"
1628
  msgstr ""
1629
 
1630
  #: application/Backend/tmpl/partial/post-access-form.php:209
1631
- #: application/Backend/tmpl/service/404redirect.php:53
1632
  #: application/Backend/tmpl/service/login-redirect.php:60
1633
  #: application/Backend/tmpl/service/logout-redirect.php:60
1634
  #: application/Backend/tmpl/service/redirect.php:86
@@ -1637,7 +1649,7 @@ msgid "The URL"
1637
  msgstr ""
1638
 
1639
  #: application/Backend/tmpl/partial/post-access-form.php:214
1640
- #: application/Backend/tmpl/service/404redirect.php:58
1641
  #: application/Backend/tmpl/service/login-redirect.php:65
1642
  #: application/Backend/tmpl/service/logout-redirect.php:65
1643
  #: application/Backend/tmpl/service/redirect.php:91
@@ -1736,22 +1748,27 @@ msgstr ""
1736
  msgid "Manage Visitors"
1737
  msgstr ""
1738
 
1739
- #: application/Backend/tmpl/service/404redirect.php:9
1740
- msgid "Setup [default] 404 redirect for all none-existing pages."
 
1741
  msgstr ""
1742
 
1743
- #: application/Backend/tmpl/service/404redirect.php:22
1744
- msgid "Default WordPress 404 handler"
 
 
1745
  msgstr ""
1746
 
1747
- #: application/Backend/tmpl/service/404redirect.php:30
1748
- msgid "Redirected to the URL [(enter valid URL starting from http or https)]"
 
 
1749
  msgstr ""
1750
 
1751
- #: application/Backend/tmpl/service/404redirect.php:62
 
1752
  msgid ""
1753
- "You cannot setup 404 redirect for specific user, role or visitors. Switch to "
1754
- "[Manage Default Access] and define default 404 redirect for everybody."
1755
  msgstr ""
1756
 
1757
  #: application/Backend/tmpl/service/capability.php:11
@@ -1910,16 +1927,6 @@ msgid ""
1910
  "solutions."
1911
  msgstr ""
1912
 
1913
- #: application/Backend/tmpl/service/login-redirect.php:29
1914
- #: application/Backend/tmpl/service/logout-redirect.php:29
1915
- msgid "WordPress default behavior"
1916
- msgstr ""
1917
-
1918
- #: application/Backend/tmpl/service/login-redirect.php:37
1919
- msgid ""
1920
- "Redirected to the local URL [(enter full URL starting from http or https)]"
1921
- msgstr ""
1922
-
1923
  #: application/Backend/tmpl/service/logout-redirect.php:9
1924
  msgid "Define the [default] logout redirect for all the users and roles."
1925
  msgstr ""
@@ -1989,7 +1996,7 @@ msgid "URI"
1989
  msgstr ""
1990
 
1991
  #: application/Backend/tmpl/service/menu.php:163
1992
- #: application/Backend/tmpl/service/toolbar.php:101 media/js/aam.js:763
1993
  msgid "ID"
1994
  msgstr ""
1995
 
@@ -2076,12 +2083,12 @@ msgid "Reset To Default"
2076
  msgstr ""
2077
 
2078
  #: application/Backend/tmpl/service/policy.php:35
2079
- #: application/Service/AccessPolicy.php:186
2080
  msgid "Policy"
2081
  msgstr ""
2082
 
2083
  #: application/Backend/tmpl/service/policy.php:51
2084
- #: application/Backend/tmpl/service/policy.php:57 media/js/aam.js:1483
2085
  msgid "Delete Policy"
2086
  msgstr ""
2087
 
@@ -2118,8 +2125,8 @@ msgstr ""
2118
  msgid "Assignee(s)"
2119
  msgstr ""
2120
 
2121
- #: application/Backend/tmpl/service/policy.php:97 media/js/aam.js:1400
2122
- #: media/js/aam.js:1507
2123
  msgid "Install"
2124
  msgstr ""
2125
 
@@ -2421,57 +2428,57 @@ msgstr ""
2421
 
2422
  #: application/Core/Redirect.php:77
2423
  #: application/Service/ExtendedCapabilities.php:109
2424
- #: application/Service/Route.php:171
2425
  msgid "Access Denied"
2426
  msgstr ""
2427
 
2428
- #: application/Service/AccessPolicy.php:70
2429
  msgid ""
2430
  "Manage access to the website with well documented JSON access policies for "
2431
  "any user, role or visitors. Keep the paper-trail of all the access changes "
2432
  "with policy revisions."
2433
  msgstr ""
2434
 
2435
- #: application/Service/AccessPolicy.php:100
2436
  msgid "Access Policy Document"
2437
  msgstr ""
2438
 
2439
- #: application/Service/AccessPolicy.php:111
2440
  msgid "Access Policy Assignee"
2441
  msgstr ""
2442
 
2443
- #: application/Service/AccessPolicy.php:182
2444
  msgid "Access Policy"
2445
  msgstr ""
2446
 
2447
- #: application/Service/AccessPolicy.php:187
2448
  msgid "Add New Policy"
2449
  msgstr ""
2450
 
2451
- #: application/Service/AccessPolicy.php:188
2452
  msgid "New Policy"
2453
  msgstr ""
2454
 
2455
- #: application/Service/AccessPolicy.php:190
2456
  msgid "Access and security policy"
2457
  msgstr ""
2458
 
2459
- #: application/Service/AdminMenu.php:59
2460
  msgid "Admin Menu"
2461
  msgstr ""
2462
 
2463
- #: application/Service/AdminMenu.php:60
2464
  msgid ""
2465
  "Manage access to the admin (backend) main menu for any role or individual "
2466
  "user. The service removes restricted menu items and protects direct access "
2467
  "to them."
2468
  msgstr ""
2469
 
2470
- #: application/Service/AdminMenu.php:277
2471
  msgid "Sorry, you are not allowed to view this page."
2472
  msgstr ""
2473
 
2474
- #: application/Service/Capability.php:53
2475
  msgid ""
2476
  "Manage list of all the registered with WordPress core capabilities for any "
2477
  "role or individual user. The service allows to create new or update and "
@@ -2479,26 +2486,30 @@ msgid ""
2479
  "user/role access management."
2480
  msgstr ""
2481
 
2482
- #: application/Service/Content.php:95
2483
  msgid ""
2484
  "Manage access to your website content for any user, role or visitor. This "
2485
  "include access to posts, pages, media attachment, custom post types, "
2486
  "categories, tags, custom taxonomies and terms."
2487
  msgstr ""
2488
 
2489
- #: application/Service/Content.php:140
2490
  msgid "Access Manager"
2491
  msgstr ""
2492
 
2493
- #: application/Service/Content.php:220
2494
  msgid "You are not allowed to publish this content"
2495
  msgstr ""
2496
 
2497
- #: application/Service/Content.php:641
2498
  msgid "[No teaser message provided]"
2499
  msgstr ""
2500
 
2501
- #: application/Service/DeniedRedirect.php:64
 
 
 
 
2502
  msgid ""
2503
  "Manage the default access denied redirect when access gets denied for any "
2504
  "protected website resource. The service hooks into the WordPress core wp_die "
@@ -2515,44 +2526,52 @@ msgid ""
2515
  "granular access control to the backend core features."
2516
  msgstr ""
2517
 
2518
- #: application/Service/Jwt.php:64
2519
  msgid ""
2520
  "Manage the website authentication with JWT Bearer token. The service "
2521
  "facilitates the ability to manage the list of issued JWT token for any user, "
2522
  "revoke them or issue new on demand."
2523
  msgstr ""
2524
 
2525
- #: application/Service/Jwt.php:115
2526
  msgid "Issue JWT Token"
2527
  msgstr ""
2528
 
2529
- #: application/Service/Jwt.php:162 application/Service/Jwt.php:172
2530
- #: application/Service/Jwt.php:184 application/Service/Jwt.php:194
2531
- #: application/Service/Jwt.php:206
 
 
 
 
2532
  msgid "JWT token."
2533
  msgstr ""
2534
 
2535
- #: application/Service/Jwt.php:316
2536
  msgid "JWT token is not refreshable"
2537
  msgstr ""
2538
 
2539
- #: application/Service/Jwt.php:355
2540
  msgid "Failed to revoke provided token"
2541
  msgstr ""
2542
 
2543
- #: application/Service/LoginRedirect.php:53
 
 
 
 
2544
  msgid ""
2545
  "Manage login redirect for any group of users or individual user when "
2546
  "authentication is completed successfully."
2547
  msgstr ""
2548
 
2549
- #: application/Service/LogoutRedirect.php:66
2550
  msgid ""
2551
  "Manage logout redirect for any group of users or individual user after user "
2552
  "logged out successfully."
2553
  msgstr ""
2554
 
2555
- #: application/Service/Metabox.php:43
2556
  msgid ""
2557
  "Manage visibility for the classic (not Gutenberg blocks) backend metaboxes, "
2558
  "dashboard and frontend widgets for any role, user or visitors. The service "
@@ -2570,69 +2589,69 @@ msgid ""
2570
  "well as all access settings (if configured accordingly)."
2571
  msgstr ""
2572
 
2573
- #: application/Service/NotFoundRedirect.php:53
2574
  msgid ""
2575
  "Manage frontend 404 (Not Found) redirect for any group of users or "
2576
  "individual user."
2577
  msgstr ""
2578
 
2579
- #: application/Service/Route.php:53
2580
  msgid ""
2581
  "Manage access to any individual RESTful endpoint for any role, user or "
2582
  "unauthenticated application request. The service works great with JWT "
2583
  "service that authenticate requests with JWT Bearer token."
2584
  msgstr ""
2585
 
2586
- #: application/Service/Route.php:81
2587
  msgid "XML-RPC WordPress API"
2588
  msgstr ""
2589
 
2590
- #: application/Service/Route.php:82
2591
  #, php-format
2592
  msgid ""
2593
  "Remote procedure call (RPC) interface is used to manage WordPress website "
2594
  "content and features. For more information check %sXML-RPC Support%s article."
2595
  msgstr ""
2596
 
2597
- #: application/Service/Route.php:86
2598
  msgid "RESTful WordPress API"
2599
  msgstr ""
2600
 
2601
- #: application/Service/Route.php:87
2602
  #, php-format
2603
  msgid ""
2604
  "RESTful interface that is used to manage WordPress website content and "
2605
  "features. For more information check %sREST API handbook%s."
2606
  msgstr ""
2607
 
2608
- #: application/Service/Route.php:113
2609
  msgid "RESTful API is disabled"
2610
  msgstr ""
2611
 
2612
- #: application/Service/SecureLogin.php:47
2613
  msgid "Secure Login"
2614
  msgstr ""
2615
 
2616
- #: application/Service/SecureLogin.php:48
2617
  msgid ""
2618
  "Enhance default WordPress authentication process with more secure login "
2619
  "mechanism. The service registers frontend AJAX Login widget as well as "
2620
  "additional endpoints for the RESTful API authentication."
2621
  msgstr ""
2622
 
2623
- #: application/Service/SecureLogin.php:109
2624
  msgid "Block User Account"
2625
  msgstr ""
2626
 
2627
- #: application/Service/SecureLogin.php:327
2628
  msgid "Exceeded maximum number for authentication attempts. Try again later."
2629
  msgstr ""
2630
 
2631
- #: application/Service/SecureLogin.php:354
2632
  msgid "[ERROR]: User is locked. Contact website administrator."
2633
  msgstr ""
2634
 
2635
- #: application/Service/SecureLogin.php:377
2636
  #, php-format
2637
  msgid "%sAccess is restricted. Login to get access.%s"
2638
  msgstr ""
@@ -2647,29 +2666,29 @@ msgid ""
2647
  "frontent content as well as some UI helpers."
2648
  msgstr ""
2649
 
2650
- #: application/Service/Toolbar.php:66
2651
  msgid "Admin Toolbar"
2652
  msgstr ""
2653
 
2654
- #: application/Service/Toolbar.php:67
2655
  msgid ""
2656
  "Manage access to the top admin toolbar items for any role or individual "
2657
  "user. The service only removes restricted items but does not actually "
2658
  "protect from direct access via link."
2659
  msgstr ""
2660
 
2661
- #: application/Service/Uri.php:57
2662
  msgid ""
2663
  "Manage direct access to the website URIs for any role or individual user. "
2664
  "Define either explicit URI or wildcard (with Plus Package addon) as well as "
2665
  "how to manage user request (allow, deny, redirect, etc.)."
2666
  msgstr ""
2667
 
2668
- #: application/Service/UserLevelFilter.php:45
2669
  msgid "User Level Filter"
2670
  msgstr ""
2671
 
2672
- #: application/Service/UserLevelFilter.php:46
2673
  msgid ""
2674
  "Extend default WordPress core users and roles handling, and make sure that "
2675
  "users with lower user level cannot see or manager users and roles with "
@@ -2690,65 +2709,69 @@ msgstr ""
2690
  msgid "Search role"
2691
  msgstr ""
2692
 
2693
- #: media/js/aam.js:429
2694
  msgid "Add role"
2695
  msgstr ""
2696
 
2697
- #: media/js/aam.js:1060 media/js/aam.js:2674 media/js/aam.js:2766
2698
- #: media/js/aam.js:5226
2699
  msgid "Resetting..."
2700
  msgstr ""
2701
 
2702
- #: media/js/aam.js:1519
2703
  msgid "Everybody"
2704
  msgstr ""
2705
 
2706
- #: media/js/aam.js:1521
2707
  msgid "Visitors"
2708
  msgstr ""
2709
 
2710
- #: media/js/aam.js:1528
2711
  msgid "Current User"
2712
  msgstr ""
2713
 
2714
- #: media/js/aam.js:1530
2715
  msgid "User ID"
2716
  msgstr ""
2717
 
2718
- #: media/js/aam.js:1583
2719
  msgid "Installing..."
2720
  msgstr ""
2721
 
2722
- #: media/js/aam.js:1600
2723
  msgid "Access Policy was installed successfully"
2724
  msgstr ""
2725
 
2726
- #: media/js/aam.js:2942
2727
  msgid "Post"
2728
  msgstr ""
2729
 
2730
- #: media/js/aam.js:3008
2731
  msgid "post type"
2732
  msgstr ""
2733
 
2734
- #: media/js/aam.js:3013 media/js/aam.js:3039 media/js/aam.js:3052
2735
- #: media/js/aam.js:3061 media/js/aam.js:3074
2736
  msgid "ID:"
2737
  msgstr ""
2738
 
2739
- #: media/js/aam.js:3035
2740
  msgid "taxonomy"
2741
  msgstr ""
2742
 
2743
- #: media/js/aam.js:4529
 
 
 
 
2744
  msgid "Settings has been exported successfully"
2745
  msgstr ""
2746
 
2747
- #: media/js/aam.js:4575
2748
  msgid "Settings has been imported successfully"
2749
  msgstr ""
2750
 
2751
- #: media/js/aam.js:4596
2752
  msgid "Invalid settings"
2753
  msgstr ""
2754
 
@@ -2756,11 +2779,11 @@ msgstr ""
2756
  msgid ": "
2757
  msgstr ""
2758
 
2759
- #: tests/Addon/PlusPackage/ContentAccessTest.php:185
2760
  msgid "AAM Test"
2761
  msgstr ""
2762
 
2763
- #: tests/Addon/PlusPackage/ContentAccessTest.php:186
2764
  msgid "Just for testing purposes"
2765
  msgstr ""
2766
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Advanced Access Manager\n"
4
+ "POT-Creation-Date: 2020-03-05 19:06-0500\n"
5
  "PO-Revision-Date: \n"
6
  "Last-Translator: \n"
7
  "Language-Team: AAMPlugin <support@aamplugin.com>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.3\n"
13
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
14
  "X-Poedit-SourceCharset: UTF-8\n"
15
  "X-Poedit-KeywordsList: __;preparePhrase\n"
52
  "future premium addons will be included for now additional cost."
53
  msgstr ""
54
 
55
+ #: application/Backend/Feature/Main/404Redirect.php:77
56
+ #: application/Service/NotFoundRedirect.php:54
57
  msgid "404 Redirect"
58
  msgstr ""
59
 
77
 
78
  #: application/Backend/Feature/Main/Capability.php:337
79
  #: application/Backend/Feature/Main/Capability.php:360
80
+ #: application/Backend/Feature/Main/Post.php:336
81
  #: application/Backend/tmpl/partial/post-access-form.php:81
82
  msgid "Backend"
83
  msgstr ""
93
  msgstr ""
94
 
95
  #: application/Backend/Feature/Main/Capability.php:383
96
+ #: application/Service/Capability.php:50
97
  msgid "Capabilities"
98
  msgstr ""
99
 
109
  msgid "Token is no longer valid"
110
  msgstr ""
111
 
112
+ #: application/Backend/Feature/Main/Jwt.php:227 application/Service/Jwt.php:74
113
  msgid "JWT Tokens"
114
  msgstr ""
115
 
116
  #: application/Backend/Feature/Main/LoginRedirect.php:75
117
+ #: application/Service/LoginRedirect.php:54
118
  msgid "Login Redirect"
119
  msgstr ""
120
 
121
  #: application/Backend/Feature/Main/LogoutRedirect.php:75
122
+ #: application/Service/LogoutRedirect.php:66
123
  msgid "Logout Redirect"
124
  msgstr ""
125
 
128
  msgstr ""
129
 
130
  #: application/Backend/Feature/Main/Metabox.php:264
131
+ #: application/Service/Metabox.php:44
132
  msgid "Metaboxes & Widgets"
133
  msgstr ""
134
 
135
  #: application/Backend/Feature/Main/Policy.php:103
136
+ #: application/Backend/tmpl/partial/access-policy-action.php:12
137
  msgid "Generate Access Policy"
138
  msgstr ""
139
 
147
  msgstr ""
148
 
149
  #: application/Backend/Feature/Main/Policy.php:519
150
+ #: application/Service/AccessPolicy.php:83
151
+ #: application/Service/AccessPolicy.php:201
152
  msgid "Access Policies"
153
  msgstr ""
154
 
155
+ #: application/Backend/Feature/Main/Post.php:254
156
  msgid "307 - Temporary Redirect (Default)"
157
  msgstr ""
158
 
159
+ #: application/Backend/Feature/Main/Post.php:255
160
  #: application/Backend/tmpl/service/uri.php:95
161
  msgid "301 - Moved Permanently"
162
  msgstr ""
163
 
164
+ #: application/Backend/Feature/Main/Post.php:256
165
  #: application/Backend/tmpl/service/uri.php:97
166
  msgid "303 - See Other"
167
  msgstr ""
168
 
169
+ #: application/Backend/Feature/Main/Post.php:333
170
  #: application/Backend/tmpl/partial/post-access-form.php:70
171
  msgid "Frontend"
172
  msgstr ""
173
 
174
+ #: application/Backend/Feature/Main/Post.php:339
175
  #: application/Backend/tmpl/partial/post-access-form.php:92
176
  msgid "RESTful API"
177
  msgstr ""
178
 
179
+ #: application/Backend/Feature/Main/Post.php:345
180
  msgid "All Areas"
181
  msgstr ""
182
 
183
+ #: application/Backend/Feature/Main/Post.php:395
184
  #, php-format
185
  msgid "%d times"
186
  msgstr ""
187
 
188
+ #: application/Backend/Feature/Main/Post.php:417
189
  #, php-format
190
  msgid "\"%s\" page"
191
  msgstr ""
192
 
193
+ #: application/Backend/Feature/Main/Post.php:423
194
  #, php-format
195
  msgid "%s URL"
196
  msgstr ""
197
 
198
+ #: application/Backend/Feature/Main/Post.php:427
199
  msgid "Login page"
200
  msgstr ""
201
 
202
+ #: application/Backend/Feature/Main/Post.php:1118
203
+ #: application/Service/Content.php:104
204
  msgid "Posts & Terms"
205
  msgstr ""
206
 
207
  #: application/Backend/Feature/Main/Redirect.php:75
208
+ #: application/Service/DeniedRedirect.php:74
209
  msgid "Access Denied Redirect"
210
  msgstr ""
211
 
212
  #: application/Backend/Feature/Main/Route.php:118
213
+ #: application/Service/Route.php:63
214
  msgid "API Routes"
215
  msgstr ""
216
 
218
  msgid "Toolbar"
219
  msgstr ""
220
 
221
+ #: application/Backend/Feature/Main/Uri.php:164 application/Service/Uri.php:57
222
  msgid "URI Access"
223
  msgstr ""
224
 
307
  msgid "Services"
308
  msgstr ""
309
 
310
+ #: application/Backend/Feature/Subject/Role.php:120
311
+ #: application/Backend/Feature/Subject/Role.php:192
312
+ #: application/Backend/Feature/Subject/Role.php:283
313
+ #: application/Backend/Feature/Subject/Role.php:309
314
  #: application/Backend/Feature/Subject/User.php:80
315
  msgid "Unauthorized operation"
316
  msgstr ""
317
 
318
+ #: application/Backend/Feature/Subject/Role.php:306
319
  msgid "Failed to delete the role"
320
  msgstr ""
321
 
325
 
326
  #: application/Backend/Feature/Subject/User.php:225
327
  #: application/Backend/Feature/Subject/User.php:250
328
+ #: application/Backend/View/Localization.php:151 media/js/aam.js:5238
329
  msgid "Unexpected application error"
330
  msgstr ""
331
 
345
  msgid "You are not allowed to manage any AAM subject"
346
  msgstr ""
347
 
348
+ #: application/Backend/View/Localization.php:38 media/js/aam.js:2250
349
  msgid "Search Capability"
350
  msgstr ""
351
 
352
+ #: application/Backend/View/Localization.php:39 media/js/aam.js:2251
353
  msgid "_TOTAL_ capability(s)"
354
  msgstr ""
355
 
356
+ #: application/Backend/View/Localization.php:40 media/js/aam.js:413
357
+ #: media/js/aam.js:475 media/js/aam.js:1035 media/js/aam.js:2398
358
+ #: media/js/aam.js:2440 media/js/aam.js:2704 media/js/aam.js:2725
359
+ #: media/js/aam.js:2744 media/js/aam.js:2814 media/js/aam.js:2836
360
+ #: media/js/aam.js:2855 media/js/aam.js:3774
361
  msgid "Saving..."
362
  msgstr ""
363
 
365
  msgid "Execute Migration"
366
  msgstr ""
367
 
368
+ #: application/Backend/View/Localization.php:42 media/js/aam.js:2406
369
  msgid "Failed to add new capability"
370
  msgstr ""
371
 
373
  msgid "Application error"
374
  msgstr ""
375
 
376
+ #: application/Backend/View/Localization.php:44 media/js/aam.js:2414
377
  msgid "Add Capability"
378
  msgstr ""
379
 
380
  #: application/Backend/View/Localization.php:45
381
+ #: application/Backend/tmpl/service/capability.php:76 media/js/aam.js:2456
382
  msgid "Update Capability"
383
  msgstr ""
384
 
385
  #: application/Backend/View/Localization.php:46
386
  #: application/Backend/tmpl/service/menu.php:93
387
+ #: application/Backend/tmpl/service/toolbar.php:70 media/js/aam.js:1734
388
+ #: media/js/aam.js:1865
389
  msgid "Show Menu"
390
  msgstr ""
391
 
392
  #: application/Backend/View/Localization.php:47
393
  #: application/Backend/tmpl/service/menu.php:97
394
+ #: application/Backend/tmpl/service/toolbar.php:74 media/js/aam.js:1744
395
+ #: media/js/aam.js:1875
396
  msgid "Restrict Menu"
397
  msgstr ""
398
 
399
+ #: application/Backend/View/Localization.php:48 media/js/aam.js:2045
400
  msgid "Failed to retrieve mataboxes"
401
  msgstr ""
402
 
403
+ #: application/Backend/View/Localization.php:49 media/js/aam.js:2937
404
+ #: media/js/aam.js:3659 media/js/aam.js:3859 media/js/aam.js:4105
405
  msgid "Search"
406
  msgstr ""
407
 
408
+ #: application/Backend/View/Localization.php:50 media/js/aam.js:2938
409
  msgid "_TOTAL_ object(s)"
410
  msgstr ""
411
 
414
  msgstr ""
415
 
416
  #: application/Backend/View/Localization.php:52 media/js/aam.js:60
417
+ #: media/js/aam.js:4858
418
  msgid "Loading..."
419
  msgstr ""
420
 
435
  msgstr ""
436
 
437
  #: application/Backend/View/Localization.php:57
438
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:26
439
  #: application/Backend/tmpl/service/capability.php:30
440
  #: application/Backend/tmpl/service/capability.php:64
441
+ #: application/Backend/tmpl/service/jwt.php:84 media/js/aam.js:1399
442
+ #: media/js/aam.js:3870 media/js/aam.js:4120 media/js/aam.js:4204
443
  msgid "Create"
444
  msgstr ""
445
 
456
  msgid "Add Role"
457
  msgstr ""
458
 
459
+ #: application/Backend/View/Localization.php:61 media/js/aam.js:482
460
  msgid "Failed to update role"
461
  msgstr ""
462
 
463
  #: application/Backend/View/Localization.php:62
464
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:53
465
+ #: application/Backend/tmpl/service/capability.php:90 media/js/aam.js:491
466
  msgid "Update"
467
  msgstr ""
468
 
469
  #: application/Backend/View/Localization.php:63
470
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:122
471
  #: application/Backend/tmpl/partial/post-access-form.php:156
472
+ #: media/js/aam.js:1082 media/js/aam.js:2798
473
  msgid "Reset"
474
  msgstr ""
475
 
477
  msgid "Update..."
478
  msgstr ""
479
 
480
+ #: application/Backend/View/Localization.php:65 media/js/aam.js:514
481
+ #: media/js/aam.js:1296 media/js/aam.js:2199 media/js/aam.js:3814
482
+ #: media/js/aam.js:4222
483
  msgid "Deleting..."
484
  msgstr ""
485
 
486
+ #: application/Backend/View/Localization.php:66 media/js/aam.js:520
487
  msgid "Failed to delete role"
488
  msgstr ""
489
 
490
  #: application/Backend/View/Localization.php:67
491
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:65
492
  msgid "Delete Role"
493
  msgstr ""
494
 
495
+ #: application/Backend/View/Localization.php:68 media/js/aam.js:614
496
  msgid "Failed to lock user"
497
  msgstr ""
498
 
499
+ #: application/Backend/View/Localization.php:69 media/js/aam.js:706
500
  msgid "Search user"
501
  msgstr ""
502
 
503
+ #: application/Backend/View/Localization.php:70 media/js/aam.js:2787
504
  msgid "Counter was reset successfully"
505
  msgstr ""
506
 
507
+ #: application/Backend/View/Localization.php:71 media/js/aam.js:707
508
  msgid "_TOTAL_ user(s)"
509
  msgstr ""
510
 
511
+ #: application/Backend/View/Localization.php:72 media/js/aam.js:722
512
  msgid "Create New User"
513
  msgstr ""
514
 
515
  #: application/Backend/View/Localization.php:73
516
+ #: application/Backend/tmpl/page/subject-panel.php:45 media/js/aam.js:768
517
+ #: media/js/aam.js:1531
518
  msgid "Role"
519
  msgstr ""
520
 
521
+ #: application/Backend/View/Localization.php:74 media/js/aam.js:4673
522
  msgid "Message has been sent"
523
  msgstr ""
524
 
525
  #: application/Backend/View/Localization.php:75
526
+ #: application/Backend/tmpl/metabox/main-iframe.php:159 media/js/aam.js:4590
527
  msgid "Download Exported Settings"
528
  msgstr ""
529
 
530
  #: application/Backend/View/Localization.php:76
531
+ #: application/Core/Subject/Default.php:36 media/js/aam.js:1195
532
  msgid "All Users, Roles and Visitor"
533
  msgstr ""
534
 
535
+ #: application/Backend/View/Localization.php:77 media/js/aam.js:1166
536
+ #: media/js/aam.js:1241 media/js/aam.js:4827
537
  msgid "Failed to apply policy changes"
538
  msgstr ""
539
 
540
  #: application/Backend/View/Localization.php:78
541
  #: application/Backend/tmpl/partial/visitor-principal-subject-tab.php:25
542
+ #: media/js/aam.js:1160 media/js/aam.js:1169
543
  msgid "Attach Policy To Visitors"
544
  msgstr ""
545
 
546
  #: application/Backend/View/Localization.php:79
547
  #: application/Backend/tmpl/partial/visitor-principal-subject-tab.php:23
548
+ #: media/js/aam.js:1158 media/js/aam.js:1171
549
  msgid "Detach Policy From Visitors"
550
  msgstr ""
551
 
552
+ #: application/Backend/View/Localization.php:80 media/js/aam.js:653
553
+ #: media/js/aam.js:4013
554
  msgid "Generating URL..."
555
  msgstr ""
556
 
557
  #: application/Backend/View/Localization.php:81
558
+ #: application/Core/Subject/Visitor.php:43 media/js/aam.js:1121
559
  msgid "Anonymous"
560
  msgstr ""
561
 
562
+ #: application/Backend/View/Localization.php:82 media/js/aam.js:1147
563
+ #: media/js/aam.js:1222 media/js/aam.js:2065 media/js/aam.js:4502
564
+ #: media/js/aam.js:4572
565
  msgid "Processing..."
566
  msgstr ""
567
 
568
+ #: application/Backend/View/Localization.php:83 media/js/aam.js:731
569
  msgid "Loading roles..."
570
  msgstr ""
571
 
572
+ #: application/Backend/View/Localization.php:84 media/js/aam.js:663
573
+ #: media/js/aam.js:4024
574
  msgid "Failed to generate JWT token"
575
  msgstr ""
576
 
577
+ #: application/Backend/View/Localization.php:85 media/js/aam.js:2167
578
  msgid "Failed to process request"
579
  msgstr ""
580
 
586
  msgid "Current role"
587
  msgstr ""
588
 
589
+ #: application/Backend/View/Localization.php:88
590
+ #: application/Service/Core.php:111 media/js/aam.js:3119
591
  msgid "Manage Access"
592
  msgstr ""
593
 
594
+ #: application/Backend/View/Localization.php:89 media/js/aam.js:748
595
  msgid "Filter by role"
596
  msgstr ""
597
 
598
  #: application/Backend/View/Localization.php:90
599
+ #: application/Backend/View/PostOptionList.php:82 media/js/aam.js:3131
600
  msgid "Edit"
601
  msgstr ""
602
 
603
  #: application/Backend/View/Localization.php:91
604
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:123
605
  #: application/Backend/tmpl/partial/post-access-form.php:105
606
  #: application/Backend/tmpl/partial/post-access-form.php:127
607
  #: application/Backend/tmpl/partial/post-access-form.php:157
608
  #: application/Backend/tmpl/partial/post-access-form.php:230
609
  #: application/Backend/tmpl/partial/post-access-form.php:251
610
  #: application/Backend/tmpl/partial/post-access-form.php:273
611
+ #: application/Backend/tmpl/service/uri.php:108 media/js/aam.js:1049
612
+ #: media/js/aam.js:3792
613
  msgid "Save"
614
  msgstr ""
615
 
617
  msgid "Manage role"
618
  msgstr ""
619
 
620
+ #: application/Backend/View/Localization.php:93 media/js/aam.js:241
621
  msgid "Edit role"
622
  msgstr ""
623
 
624
+ #: application/Backend/View/Localization.php:94 media/js/aam.js:294
625
+ #: media/js/aam.js:528
626
  msgid "Delete role"
627
  msgstr ""
628
 
629
+ #: application/Backend/View/Localization.php:95 media/js/aam.js:265
630
  msgid "Clone role"
631
  msgstr ""
632
 
633
+ #: application/Backend/View/Localization.php:96 media/js/aam.js:810
634
  msgid "Manage user"
635
  msgstr ""
636
 
637
+ #: application/Backend/View/Localization.php:97 media/js/aam.js:859
638
  msgid "Edit user"
639
  msgstr ""
640
 
641
+ #: application/Backend/View/Localization.php:98 media/js/aam.js:609
642
+ #: media/js/aam.js:610 media/js/aam.js:880 media/js/aam.js:891
643
  msgid "Lock user"
644
  msgstr ""
645
 
646
+ #: application/Backend/View/Localization.php:99 media/js/aam.js:603
647
+ #: media/js/aam.js:604 media/js/aam.js:904 media/js/aam.js:915
648
  msgid "Unlock user"
649
  msgstr ""
650
 
651
+ #: application/Backend/View/Localization.php:100 media/js/aam.js:2161
652
  msgid "WordPress core does not allow to grant this capability"
653
  msgstr ""
654
 
655
  #: application/Backend/View/Localization.php:101
656
  #: application/Backend/tmpl/partial/default-principal-subject-tab.php:15
657
+ #: media/js/aam.js:1233 media/js/aam.js:1246
658
  msgid "Detach Policy From Everybody"
659
  msgstr ""
660
 
661
  #: application/Backend/View/Localization.php:102
662
  #: application/Backend/tmpl/partial/default-principal-subject-tab.php:17
663
+ #: media/js/aam.js:1235 media/js/aam.js:1244
664
  msgid "Attach Policy To Everybody"
665
  msgstr ""
666
 
667
+ #: application/Backend/View/Localization.php:103 media/js/aam.js:1387
668
  msgid "Search Policy"
669
  msgstr ""
670
 
671
+ #: application/Backend/View/Localization.php:104 media/js/aam.js:1388
672
  msgid "_TOTAL_ Policies"
673
  msgstr ""
674
 
675
+ #: application/Backend/View/Localization.php:105 media/js/aam.js:1430
676
  msgid "Apply Policy"
677
  msgstr ""
678
 
679
+ #: application/Backend/View/Localization.php:106 media/js/aam.js:1450
680
  msgid "Revoke Policy"
681
  msgstr ""
682
 
683
  #: application/Backend/View/Localization.php:107
684
+ #: application/Service/AccessPolicy.php:202 media/js/aam.js:1467
685
  msgid "Edit Policy"
686
  msgstr ""
687
 
688
  #: application/Backend/View/Localization.php:108
689
  #: application/Backend/tmpl/service/menu.php:79
690
+ #: application/Backend/tmpl/service/toolbar.php:60 media/js/aam.js:1774
691
  msgid "Uncheck to allow"
692
  msgstr ""
693
 
694
  #: application/Backend/View/Localization.php:109
695
  #: application/Backend/tmpl/service/menu.php:79
696
+ #: application/Backend/tmpl/service/toolbar.php:60 media/js/aam.js:1776
697
  msgid "Check to restrict"
698
  msgstr ""
699
 
700
  #: application/Backend/View/Localization.php:110
701
+ #: application/Backend/tmpl/service/metabox.php:78 media/js/aam.js:1910
702
+ #: media/js/aam.js:2099
703
  msgid "Uncheck to show"
704
  msgstr ""
705
 
706
  #: application/Backend/View/Localization.php:111
707
+ #: application/Backend/tmpl/service/metabox.php:78 media/js/aam.js:1912
708
+ #: media/js/aam.js:2101
709
  msgid "Check to hide"
710
  msgstr ""
711
 
712
  #: application/Backend/View/Localization.php:112
713
+ #: application/Backend/tmpl/service/metabox.php:114 media/js/aam.js:2068
714
  msgid "Initialize"
715
  msgstr ""
716
 
717
+ #: application/Backend/View/Localization.php:113 media/js/aam.js:2253
718
  msgid "No capabilities"
719
  msgstr ""
720
 
721
+ #: application/Backend/View/Localization.php:114 media/js/aam.js:2959
722
  msgid "Post Type"
723
  msgstr ""
724
 
725
+ #: application/Backend/View/Localization.php:115 media/js/aam.js:2964
726
  msgid "Hierarchical Taxonomy"
727
  msgstr ""
728
 
729
+ #: application/Backend/View/Localization.php:116 media/js/aam.js:2969
730
  msgid "Hierarchical Term"
731
  msgstr ""
732
 
733
+ #: application/Backend/View/Localization.php:117 media/js/aam.js:2974
734
  msgid "Tag Taxonomy"
735
  msgstr ""
736
 
737
+ #: application/Backend/View/Localization.php:118 media/js/aam.js:2979
738
  msgid "Tag"
739
  msgstr ""
740
 
741
+ #: application/Backend/View/Localization.php:119 media/js/aam.js:2990
742
  msgid "Customized Settings"
743
  msgstr ""
744
 
745
+ #: application/Backend/View/Localization.php:120 media/js/aam.js:3060
746
+ #: media/js/aam.js:3082
747
  msgid "Parent"
748
  msgstr ""
749
 
750
+ #: application/Backend/View/Localization.php:121 media/js/aam.js:3105
751
  msgid "Drill-Down"
752
  msgstr ""
753
 
754
+ #: application/Backend/View/Localization.php:122 media/js/aam.js:3660
755
  msgid "_TOTAL_ route(s)"
756
  msgstr ""
757
 
758
+ #: application/Backend/View/Localization.php:123 media/js/aam.js:3662
759
  msgid "No API endpoints found. You might have APIs disabled."
760
  msgstr ""
761
 
762
+ #: application/Backend/View/Localization.php:124 media/js/aam.js:3663
763
+ #: media/js/aam.js:4109 media/js/aam.js:4460
764
  msgid "Nothing to show"
765
  msgstr ""
766
 
767
+ #: application/Backend/View/Localization.php:125 media/js/aam.js:3783
768
  msgid "Failed to save URI rule"
769
  msgstr ""
770
 
771
+ #: application/Backend/View/Localization.php:126 media/js/aam.js:3823
772
  msgid "Failed to delete URI rule"
773
  msgstr ""
774
 
775
+ #: application/Backend/View/Localization.php:127 media/js/aam.js:3860
776
  msgid "_TOTAL_ URI(s)"
777
  msgstr ""
778
 
779
+ #: application/Backend/View/Localization.php:128 media/js/aam.js:3901
780
  msgid "Edit Rule"
781
  msgstr ""
782
 
783
+ #: application/Backend/View/Localization.php:129 media/js/aam.js:3922
784
  msgid "Delete Rule"
785
  msgstr ""
786
 
787
+ #: application/Backend/View/Localization.php:130 media/js/aam.js:3946
788
  msgid "Denied"
789
  msgstr ""
790
 
791
+ #: application/Backend/View/Localization.php:131 media/js/aam.js:3953
792
  msgid "Redirected"
793
  msgstr ""
794
 
795
+ #: application/Backend/View/Localization.php:132 media/js/aam.js:3958
796
  msgid "Callback"
797
  msgstr ""
798
 
799
+ #: application/Backend/View/Localization.php:133 media/js/aam.js:3963
800
  msgid "Allowed"
801
  msgstr ""
802
 
803
+ #: application/Backend/View/Localization.php:134 media/js/aam.js:4009
804
  msgid "Generating token..."
805
  msgstr ""
806
 
807
+ #: application/Backend/View/Localization.php:135 media/js/aam.js:4106
808
  msgid "_TOTAL_ token(s)"
809
  msgstr ""
810
 
811
+ #: application/Backend/View/Localization.php:136 media/js/aam.js:4108
812
  msgid "No JWT tokens have been generated."
813
  msgstr ""
814
 
815
+ #: application/Backend/View/Localization.php:137 media/js/aam.js:4152
816
  msgid "Delete Token"
817
  msgstr ""
818
 
819
+ #: application/Backend/View/Localization.php:138 media/js/aam.js:4165
820
  msgid "View Token"
821
  msgstr ""
822
 
823
+ #: application/Backend/View/Localization.php:139 media/js/aam.js:4190
824
  msgid "Creating..."
825
  msgstr ""
826
 
827
+ #: application/Backend/View/Localization.php:140 media/js/aam.js:4457
828
  msgid "Search Service"
829
  msgstr ""
830
 
831
+ #: application/Backend/View/Localization.php:141 media/js/aam.js:4458
832
  msgid "_TOTAL_ service(s)"
833
  msgstr ""
834
 
835
  #: application/Backend/View/Localization.php:142
836
  #: application/Backend/tmpl/settings/content.php:19
837
  #: application/Backend/tmpl/settings/core.php:16
838
+ #: application/Backend/tmpl/settings/security.php:16 media/js/aam.js:4470
839
  msgid "Enabled"
840
  msgstr ""
841
 
842
  #: application/Backend/View/Localization.php:143
843
  #: application/Backend/tmpl/settings/content.php:19
844
  #: application/Backend/tmpl/settings/core.php:16
845
+ #: application/Backend/tmpl/settings/security.php:16 media/js/aam.js:4470
846
  msgid "Disabled"
847
  msgstr ""
848
 
849
+ #: application/Backend/View/Localization.php:144 media/js/aam.js:4508
850
  msgid "All settings has been cleared successfully"
851
  msgstr ""
852
 
853
  #: application/Backend/View/Localization.php:145
854
+ #: application/Backend/tmpl/metabox/main-iframe.php:190 media/js/aam.js:4520
855
  msgid "Clear"
856
  msgstr ""
857
 
858
  #: application/Backend/View/Localization.php:146
859
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:114
860
+ #: application/Backend/tmpl/partial/role-inheritance.php:7 media/js/aam.js:4863
861
  msgid "Select Role"
862
  msgstr ""
863
 
864
+ #: application/Backend/View/Localization.php:147 media/js/aam.js:1578
865
  msgid "Policy is not assigned to anybody"
866
  msgstr ""
867
 
868
+ #: application/Backend/View/Localization.php:148 media/js/aam.js:5158
869
  msgid "Data has been saved to clipboard"
870
  msgstr ""
871
 
872
+ #: application/Backend/View/Localization.php:149 media/js/aam.js:5162
873
  msgid "Failed to save data to clipboard"
874
  msgstr ""
875
 
876
+ #: application/Backend/View/Localization.php:150 media/js/aam.js:5234
877
  msgid "Operation completed successfully"
878
  msgstr ""
879
 
1001
  msgstr ""
1002
 
1003
  #: application/Backend/View/PostOptionList.php:87
1004
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:71
1005
  #: application/Backend/tmpl/service/jwt.php:136
1006
+ #: application/Backend/tmpl/service/uri.php:130 media/js/aam.js:3832
1007
+ #: media/js/aam.js:4236
1008
  msgid "Delete"
1009
  msgstr ""
1010
 
1062
  #: application/Backend/tmpl/metabox/main-iframe.php:119
1063
  #: application/Backend/tmpl/metabox/main-iframe.php:173
1064
  #: application/Backend/tmpl/metabox/main-iframe.php:183
1065
+ #: application/Backend/tmpl/page/addon-panel.php:82
1066
+ #: application/Backend/tmpl/page/addon-panel.php:93
1067
+ #: application/Backend/tmpl/page/addon-panel.php:103
1068
+ #: application/Backend/tmpl/page/addon-panel.php:116
1069
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:15
1070
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:27
1071
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:37
1072
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:54
1073
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:64
1074
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:72
1075
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:82
1076
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:124
1077
  #: application/Backend/tmpl/partial/post-access-form.php:62
1078
  #: application/Backend/tmpl/partial/post-access-form.php:106
1079
  #: application/Backend/tmpl/partial/post-access-form.php:116
1224
  msgstr ""
1225
 
1226
  #: application/Backend/tmpl/metabox/main-iframe.php:204
1227
+ #: application/Backend/tmpl/page/addon-panel.php:67
1228
  msgid "Read More"
1229
  msgstr ""
1230
 
1239
  msgid "Syntax Error"
1240
  msgstr ""
1241
 
1242
+ #: application/Backend/tmpl/page/addon-panel.php:17
1243
  msgid ""
1244
  "By purchasing any of the premium addon(s) below, you obtain the license that "
1245
  "allows you to install and use AAM software for one physical WordPress "
1250
  "guaranteed] within 30 day from the time of purchase."
1251
  msgstr ""
1252
 
1253
+ #: application/Backend/tmpl/page/addon-panel.php:22
1254
  msgid "Download Addon"
1255
  msgstr ""
1256
 
1257
+ #: application/Backend/tmpl/page/addon-panel.php:26
1258
  msgid "Enter The License Key"
1259
  msgstr ""
1260
 
1261
+ #: application/Backend/tmpl/page/addon-panel.php:30
1262
  msgid "Download"
1263
  msgstr ""
1264
 
1265
+ #: application/Backend/tmpl/page/addon-panel.php:38
1266
  msgid "Premium"
1267
  msgstr ""
1268
 
1269
+ #: application/Backend/tmpl/page/addon-panel.php:39
1270
  msgid "Check For Updates"
1271
  msgstr ""
1272
 
1273
+ #: application/Backend/tmpl/page/addon-panel.php:51
1274
+ #: application/Backend/tmpl/page/addon-panel.php:53
1275
  msgid "License"
1276
  msgstr ""
1277
 
1278
+ #: application/Backend/tmpl/page/addon-panel.php:53
1279
  msgid "unregistered version"
1280
  msgstr ""
1281
 
1282
+ #: application/Backend/tmpl/page/addon-panel.php:61
1283
  msgid "Update Available"
1284
  msgstr ""
1285
 
1286
+ #: application/Backend/tmpl/page/addon-panel.php:63
1287
  msgid "Active"
1288
  msgstr ""
1289
 
1290
+ #: application/Backend/tmpl/page/addon-panel.php:65
1291
  msgid "Inactive"
1292
  msgstr ""
1293
 
1294
+ #: application/Backend/tmpl/page/addon-panel.php:83
1295
  msgid "License Key Info"
1296
  msgstr ""
1297
 
1298
+ #: application/Backend/tmpl/page/addon-panel.php:87
1299
  msgid ""
1300
  "Insert license key that you received after the payment (find the email "
1301
  "example below). It might take up to 2 hours to process the payment."
1302
  msgstr ""
1303
 
1304
+ #: application/Backend/tmpl/page/addon-panel.php:104
1305
  msgid "Plugin Installation"
1306
  msgstr ""
1307
 
1308
+ #: application/Backend/tmpl/page/addon-panel.php:108
1309
  msgid "The plugin has been successfully downloaded from our server."
1310
  msgstr ""
1311
 
1312
+ #: application/Backend/tmpl/page/addon-panel.php:112
1313
  #, php-format
1314
  msgid ""
1315
  "With AAM v6.0.0 or higher, all premium addons are [regular WordPress "
1321
  msgid "You are not allowed to manage any of the existing services."
1322
  msgstr ""
1323
 
1324
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:16
1325
  msgid "Create Role"
1326
  msgstr ""
1327
 
1328
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:20
1329
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:42
1330
  msgid "Role Name"
1331
  msgstr ""
1332
 
1333
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:21
1334
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:43
1335
  msgid "Enter Role Name"
1336
  msgstr ""
1337
 
1338
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:38
1339
  msgid "Update Role"
1340
  msgstr ""
1341
 
1342
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:46
1343
+ msgid "Role Slug"
1344
+ msgstr ""
1345
+
1346
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:48
1347
+ msgid "Can be changed if no users are assigned to role"
1348
+ msgstr ""
1349
+
1350
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:68
1351
  #, php-format
1352
  msgid "Are you sure that you want to delete the %s role?"
1353
  msgstr ""
1354
 
1355
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:83
1356
  msgid "Manage User"
1357
  msgstr ""
1358
 
1359
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:86
1360
  msgid ""
1361
  "Define for how long user can access the website and what action needs to be "
1362
  "taken after access expires."
1363
  msgstr ""
1364
 
1365
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:95
1366
  msgid "Action After Expiration"
1367
  msgstr ""
1368
 
1369
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:98
1370
  msgid "Select Action"
1371
  msgstr ""
1372
 
1373
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:99
1374
  msgid "Logout User"
1375
  msgstr ""
1376
 
1377
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:100
1378
  msgid "Delete Account"
1379
  msgstr ""
1380
 
1381
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:101
1382
  msgid "Change User Role"
1383
  msgstr ""
1384
 
1385
+ #: application/Backend/tmpl/page/subject-panel-advanced.php:112
1386
  msgid "Change To Role"
1387
  msgstr ""
1388
 
1421
  "default access settings."
1422
  msgstr ""
1423
 
1424
+ #: application/Backend/tmpl/partial/access-policy-action.php:14
1425
  msgid "Download as File"
1426
  msgstr ""
1427
 
1428
+ #: application/Backend/tmpl/partial/access-policy-action.php:15
1429
  msgid "Create New Policy"
1430
  msgstr ""
1431
 
1432
+ #: application/Backend/tmpl/partial/access-policy-action.php:17
1433
  msgid "Learn More"
1434
  msgstr ""
1435
 
1491
  msgstr ""
1492
 
1493
  #: application/Backend/tmpl/partial/post-access-form.php:12
1494
+ #: application/Backend/tmpl/service/404redirect.php:24
1495
  #: application/Backend/tmpl/service/login-redirect.php:17
1496
  #: application/Backend/tmpl/service/logout-redirect.php:17
1497
  #: application/Backend/tmpl/service/menu.php:17
1503
  msgstr ""
1504
 
1505
  #: application/Backend/tmpl/partial/post-access-form.php:13
1506
+ #: application/Backend/tmpl/service/404redirect.php:25
1507
  #: application/Backend/tmpl/service/login-redirect.php:18
1508
  #: application/Backend/tmpl/service/logout-redirect.php:18
1509
  #: application/Backend/tmpl/service/menu.php:18
1587
  msgstr ""
1588
 
1589
  #: application/Backend/tmpl/partial/post-access-form.php:177
1590
+ #: application/Backend/tmpl/service/404redirect.php:40
1591
  #: application/Backend/tmpl/service/login-redirect.php:33
1592
  #: application/Backend/tmpl/service/logout-redirect.php:33
1593
  #: application/Backend/tmpl/service/redirect.php:54
1609
  msgstr ""
1610
 
1611
  #: application/Backend/tmpl/partial/post-access-form.php:191
1612
+ #: application/Backend/tmpl/service/404redirect.php:48
1613
  #: application/Backend/tmpl/service/login-redirect.php:41
1614
  #: application/Backend/tmpl/service/logout-redirect.php:41
1615
  #: application/Backend/tmpl/service/redirect.php:62
1620
  msgstr ""
1621
 
1622
  #: application/Backend/tmpl/partial/post-access-form.php:195
1623
+ #: application/Backend/tmpl/service/404redirect.php:52
1624
  #: application/Backend/tmpl/service/login-redirect.php:45
1625
  #: application/Backend/tmpl/service/logout-redirect.php:45
1626
  #: application/Backend/tmpl/service/redirect.php:71
1630
  msgstr ""
1631
 
1632
  #: application/Backend/tmpl/partial/post-access-form.php:203
1633
+ #: application/Backend/tmpl/service/404redirect.php:61
1634
  #: application/Backend/tmpl/service/login-redirect.php:54
1635
  #: application/Backend/tmpl/service/logout-redirect.php:54
1636
  #: application/Backend/tmpl/service/redirect.php:80
1640
  msgstr ""
1641
 
1642
  #: application/Backend/tmpl/partial/post-access-form.php:209
1643
+ #: application/Backend/tmpl/service/404redirect.php:67
1644
  #: application/Backend/tmpl/service/login-redirect.php:60
1645
  #: application/Backend/tmpl/service/logout-redirect.php:60
1646
  #: application/Backend/tmpl/service/redirect.php:86
1649
  msgstr ""
1650
 
1651
  #: application/Backend/tmpl/partial/post-access-form.php:214
1652
+ #: application/Backend/tmpl/service/404redirect.php:72
1653
  #: application/Backend/tmpl/service/login-redirect.php:65
1654
  #: application/Backend/tmpl/service/logout-redirect.php:65
1655
  #: application/Backend/tmpl/service/redirect.php:91
1748
  msgid "Manage Visitors"
1749
  msgstr ""
1750
 
1751
+ #: application/Backend/tmpl/service/404redirect.php:16
1752
+ msgid ""
1753
+ "Define the [default] 404 (Not Found) redirect for all the users and roles."
1754
  msgstr ""
1755
 
1756
+ #: application/Backend/tmpl/service/404redirect.php:20
1757
+ #, php-format
1758
+ msgid ""
1759
+ "Customize 404 (Not Found) redirect for [%s] when requested page is not found."
1760
  msgstr ""
1761
 
1762
+ #: application/Backend/tmpl/service/404redirect.php:36
1763
+ #: application/Backend/tmpl/service/login-redirect.php:29
1764
+ #: application/Backend/tmpl/service/logout-redirect.php:29
1765
+ msgid "WordPress default behavior"
1766
  msgstr ""
1767
 
1768
+ #: application/Backend/tmpl/service/404redirect.php:44
1769
+ #: application/Backend/tmpl/service/login-redirect.php:37
1770
  msgid ""
1771
+ "Redirected to the local URL [(enter full URL starting from http or https)]"
 
1772
  msgstr ""
1773
 
1774
  #: application/Backend/tmpl/service/capability.php:11
1927
  "solutions."
1928
  msgstr ""
1929
 
 
 
 
 
 
 
 
 
 
 
1930
  #: application/Backend/tmpl/service/logout-redirect.php:9
1931
  msgid "Define the [default] logout redirect for all the users and roles."
1932
  msgstr ""
1996
  msgstr ""
1997
 
1998
  #: application/Backend/tmpl/service/menu.php:163
1999
+ #: application/Backend/tmpl/service/toolbar.php:101 media/js/aam.js:771
2000
  msgid "ID"
2001
  msgstr ""
2002
 
2083
  msgstr ""
2084
 
2085
  #: application/Backend/tmpl/service/policy.php:35
2086
+ #: application/Service/AccessPolicy.php:203
2087
  msgid "Policy"
2088
  msgstr ""
2089
 
2090
  #: application/Backend/tmpl/service/policy.php:51
2091
+ #: application/Backend/tmpl/service/policy.php:57 media/js/aam.js:1491
2092
  msgid "Delete Policy"
2093
  msgstr ""
2094
 
2125
  msgid "Assignee(s)"
2126
  msgstr ""
2127
 
2128
+ #: application/Backend/tmpl/service/policy.php:97 media/js/aam.js:1408
2129
+ #: media/js/aam.js:1515
2130
  msgid "Install"
2131
  msgstr ""
2132
 
2428
 
2429
  #: application/Core/Redirect.php:77
2430
  #: application/Service/ExtendedCapabilities.php:109
2431
+ #: application/Service/Route.php:226
2432
  msgid "Access Denied"
2433
  msgstr ""
2434
 
2435
+ #: application/Service/AccessPolicy.php:84
2436
  msgid ""
2437
  "Manage access to the website with well documented JSON access policies for "
2438
  "any user, role or visitors. Keep the paper-trail of all the access changes "
2439
  "with policy revisions."
2440
  msgstr ""
2441
 
2442
+ #: application/Service/AccessPolicy.php:114
2443
  msgid "Access Policy Document"
2444
  msgstr ""
2445
 
2446
+ #: application/Service/AccessPolicy.php:125
2447
  msgid "Access Policy Assignee"
2448
  msgstr ""
2449
 
2450
+ #: application/Service/AccessPolicy.php:199
2451
  msgid "Access Policy"
2452
  msgstr ""
2453
 
2454
+ #: application/Service/AccessPolicy.php:204
2455
  msgid "Add New Policy"
2456
  msgstr ""
2457
 
2458
+ #: application/Service/AccessPolicy.php:205
2459
  msgid "New Policy"
2460
  msgstr ""
2461
 
2462
+ #: application/Service/AccessPolicy.php:207
2463
  msgid "Access and security policy"
2464
  msgstr ""
2465
 
2466
+ #: application/Service/AdminMenu.php:69
2467
  msgid "Admin Menu"
2468
  msgstr ""
2469
 
2470
+ #: application/Service/AdminMenu.php:70
2471
  msgid ""
2472
  "Manage access to the admin (backend) main menu for any role or individual "
2473
  "user. The service removes restricted menu items and protects direct access "
2474
  "to them."
2475
  msgstr ""
2476
 
2477
+ #: application/Service/AdminMenu.php:325
2478
  msgid "Sorry, you are not allowed to view this page."
2479
  msgstr ""
2480
 
2481
+ #: application/Service/Capability.php:51
2482
  msgid ""
2483
  "Manage list of all the registered with WordPress core capabilities for any "
2484
  "role or individual user. The service allows to create new or update and "
2486
  "user/role access management."
2487
  msgstr ""
2488
 
2489
+ #: application/Service/Content.php:105
2490
  msgid ""
2491
  "Manage access to your website content for any user, role or visitor. This "
2492
  "include access to posts, pages, media attachment, custom post types, "
2493
  "categories, tags, custom taxonomies and terms."
2494
  msgstr ""
2495
 
2496
+ #: application/Service/Content.php:150
2497
  msgid "Access Manager"
2498
  msgstr ""
2499
 
2500
+ #: application/Service/Content.php:231
2501
  msgid "You are not allowed to publish this content"
2502
  msgstr ""
2503
 
2504
+ #: application/Service/Content.php:898
2505
  msgid "[No teaser message provided]"
2506
  msgstr ""
2507
 
2508
+ #: application/Service/Core.php:88
2509
+ msgid "Manager Access"
2510
+ msgstr ""
2511
+
2512
+ #: application/Service/DeniedRedirect.php:75
2513
  msgid ""
2514
  "Manage the default access denied redirect when access gets denied for any "
2515
  "protected website resource. The service hooks into the WordPress core wp_die "
2526
  "granular access control to the backend core features."
2527
  msgstr ""
2528
 
2529
+ #: application/Service/Jwt.php:75
2530
  msgid ""
2531
  "Manage the website authentication with JWT Bearer token. The service "
2532
  "facilitates the ability to manage the list of issued JWT token for any user, "
2533
  "revoke them or issue new on demand."
2534
  msgstr ""
2535
 
2536
+ #: application/Service/Jwt.php:128
2537
  msgid "Issue JWT Token"
2538
  msgstr ""
2539
 
2540
+ #: application/Service/Jwt.php:132
2541
+ msgid "Issue a refreshable JWT Token"
2542
+ msgstr ""
2543
+
2544
+ #: application/Service/Jwt.php:182 application/Service/Jwt.php:192
2545
+ #: application/Service/Jwt.php:204 application/Service/Jwt.php:214
2546
+ #: application/Service/Jwt.php:226
2547
  msgid "JWT token."
2548
  msgstr ""
2549
 
2550
+ #: application/Service/Jwt.php:336
2551
  msgid "JWT token is not refreshable"
2552
  msgstr ""
2553
 
2554
+ #: application/Service/Jwt.php:375
2555
  msgid "Failed to revoke provided token"
2556
  msgstr ""
2557
 
2558
+ #: application/Service/Jwt.php:417
2559
+ msgid "Current user is not allowed to issue refreshable JWT token"
2560
+ msgstr ""
2561
+
2562
+ #: application/Service/LoginRedirect.php:55
2563
  msgid ""
2564
  "Manage login redirect for any group of users or individual user when "
2565
  "authentication is completed successfully."
2566
  msgstr ""
2567
 
2568
+ #: application/Service/LogoutRedirect.php:67
2569
  msgid ""
2570
  "Manage logout redirect for any group of users or individual user after user "
2571
  "logged out successfully."
2572
  msgstr ""
2573
 
2574
+ #: application/Service/Metabox.php:45
2575
  msgid ""
2576
  "Manage visibility for the classic (not Gutenberg blocks) backend metaboxes, "
2577
  "dashboard and frontend widgets for any role, user or visitors. The service "
2589
  "well as all access settings (if configured accordingly)."
2590
  msgstr ""
2591
 
2592
+ #: application/Service/NotFoundRedirect.php:55
2593
  msgid ""
2594
  "Manage frontend 404 (Not Found) redirect for any group of users or "
2595
  "individual user."
2596
  msgstr ""
2597
 
2598
+ #: application/Service/Route.php:64
2599
  msgid ""
2600
  "Manage access to any individual RESTful endpoint for any role, user or "
2601
  "unauthenticated application request. The service works great with JWT "
2602
  "service that authenticate requests with JWT Bearer token."
2603
  msgstr ""
2604
 
2605
+ #: application/Service/Route.php:96
2606
  msgid "XML-RPC WordPress API"
2607
  msgstr ""
2608
 
2609
+ #: application/Service/Route.php:97
2610
  #, php-format
2611
  msgid ""
2612
  "Remote procedure call (RPC) interface is used to manage WordPress website "
2613
  "content and features. For more information check %sXML-RPC Support%s article."
2614
  msgstr ""
2615
 
2616
+ #: application/Service/Route.php:101
2617
  msgid "RESTful WordPress API"
2618
  msgstr ""
2619
 
2620
+ #: application/Service/Route.php:102
2621
  #, php-format
2622
  msgid ""
2623
  "RESTful interface that is used to manage WordPress website content and "
2624
  "features. For more information check %sREST API handbook%s."
2625
  msgstr ""
2626
 
2627
+ #: application/Service/Route.php:128
2628
  msgid "RESTful API is disabled"
2629
  msgstr ""
2630
 
2631
+ #: application/Service/SecureLogin.php:59
2632
  msgid "Secure Login"
2633
  msgstr ""
2634
 
2635
+ #: application/Service/SecureLogin.php:60
2636
  msgid ""
2637
  "Enhance default WordPress authentication process with more secure login "
2638
  "mechanism. The service registers frontend AJAX Login widget as well as "
2639
  "additional endpoints for the RESTful API authentication."
2640
  msgstr ""
2641
 
2642
+ #: application/Service/SecureLogin.php:124
2643
  msgid "Block User Account"
2644
  msgstr ""
2645
 
2646
+ #: application/Service/SecureLogin.php:353
2647
  msgid "Exceeded maximum number for authentication attempts. Try again later."
2648
  msgstr ""
2649
 
2650
+ #: application/Service/SecureLogin.php:380
2651
  msgid "[ERROR]: User is locked. Contact website administrator."
2652
  msgstr ""
2653
 
2654
+ #: application/Service/SecureLogin.php:403
2655
  #, php-format
2656
  msgid "%sAccess is restricted. Login to get access.%s"
2657
  msgstr ""
2666
  "frontent content as well as some UI helpers."
2667
  msgstr ""
2668
 
2669
+ #: application/Service/Toolbar.php:67
2670
  msgid "Admin Toolbar"
2671
  msgstr ""
2672
 
2673
+ #: application/Service/Toolbar.php:68
2674
  msgid ""
2675
  "Manage access to the top admin toolbar items for any role or individual "
2676
  "user. The service only removes restricted items but does not actually "
2677
  "protect from direct access via link."
2678
  msgstr ""
2679
 
2680
+ #: application/Service/Uri.php:58
2681
  msgid ""
2682
  "Manage direct access to the website URIs for any role or individual user. "
2683
  "Define either explicit URI or wildcard (with Plus Package addon) as well as "
2684
  "how to manage user request (allow, deny, redirect, etc.)."
2685
  msgstr ""
2686
 
2687
+ #: application/Service/UserLevelFilter.php:55
2688
  msgid "User Level Filter"
2689
  msgstr ""
2690
 
2691
+ #: application/Service/UserLevelFilter.php:56
2692
  msgid ""
2693
  "Extend default WordPress core users and roles handling, and make sure that "
2694
  "users with lower user level cannot see or manager users and roles with "
2709
  msgid "Search role"
2710
  msgstr ""
2711
 
2712
+ #: media/js/aam.js:436
2713
  msgid "Add role"
2714
  msgstr ""
2715
 
2716
+ #: media/js/aam.js:1068 media/js/aam.js:2686 media/js/aam.js:2778
2717
+ #: media/js/aam.js:5274
2718
  msgid "Resetting..."
2719
  msgstr ""
2720
 
2721
+ #: media/js/aam.js:1527
2722
  msgid "Everybody"
2723
  msgstr ""
2724
 
2725
+ #: media/js/aam.js:1529
2726
  msgid "Visitors"
2727
  msgstr ""
2728
 
2729
+ #: media/js/aam.js:1536
2730
  msgid "Current User"
2731
  msgstr ""
2732
 
2733
+ #: media/js/aam.js:1538
2734
  msgid "User ID"
2735
  msgstr ""
2736
 
2737
+ #: media/js/aam.js:1591
2738
  msgid "Installing..."
2739
  msgstr ""
2740
 
2741
+ #: media/js/aam.js:1608
2742
  msgid "Access Policy was installed successfully"
2743
  msgstr ""
2744
 
2745
+ #: media/js/aam.js:2954
2746
  msgid "Post"
2747
  msgstr ""
2748
 
2749
+ #: media/js/aam.js:3020
2750
  msgid "post type"
2751
  msgstr ""
2752
 
2753
+ #: media/js/aam.js:3025 media/js/aam.js:3051 media/js/aam.js:3064
2754
+ #: media/js/aam.js:3073 media/js/aam.js:3086
2755
  msgid "ID:"
2756
  msgstr ""
2757
 
2758
+ #: media/js/aam.js:3047
2759
  msgid "taxonomy"
2760
  msgstr ""
2761
 
2762
+ #: media/js/aam.js:3910 media/js/aam.js:3931
2763
+ msgid "Inherited"
2764
+ msgstr ""
2765
+
2766
+ #: media/js/aam.js:4577
2767
  msgid "Settings has been exported successfully"
2768
  msgstr ""
2769
 
2770
+ #: media/js/aam.js:4623
2771
  msgid "Settings has been imported successfully"
2772
  msgstr ""
2773
 
2774
+ #: media/js/aam.js:4644
2775
  msgid "Invalid settings"
2776
  msgstr ""
2777
 
2779
  msgid ": "
2780
  msgstr ""
2781
 
2782
+ #: tests/Addon/PlusPackage/ContentAccessTest.php:137
2783
  msgid "AAM Test"
2784
  msgstr ""
2785
 
2786
+ #: tests/Addon/PlusPackage/ContentAccessTest.php:138
2787
  msgid "Just for testing purposes"
2788
  msgstr ""
2789
 
media/js/aam.js CHANGED
@@ -222,9 +222,16 @@
222
  resetForm('#edit-role-modal .modal-body');
223
  $('#edit-role-btn').data('role', data[0]);
224
  $('#edit-role-name').val(data[2]);
 
225
  $('#edit-role-modal').modal('show');
226
  fetchRoleList(data[0]);
227
 
 
 
 
 
 
 
228
  //TODO - Rewrite JavaScript to support $.aam
229
  $.aamEditRole = data;
230
 
@@ -368,7 +375,7 @@
368
  $('#add-role-modal').on('shown.bs.modal', function (e) {
369
  fetchRoleList();
370
  //clear add role form first
371
- $('input[name="name"]', '#add-role-modal').val('').focus();
372
  });
373
 
374
  $('#edit-role-modal').on('shown.bs.modal', function (e) {
@@ -439,6 +446,7 @@
439
  var _this = this;
440
 
441
  $('#edit-role-name').parent().removeClass('has-error');
 
442
 
443
  var data = {
444
  action: 'aam',
@@ -468,7 +476,7 @@
468
  },
469
  success: function (response) {
470
  if (response.status === 'success') {
471
- $('#role-list').DataTable().ajax.reload();
472
  } else {
473
  getAAM().notification(
474
  'danger', getAAM().__('Failed to update role')
@@ -1620,6 +1628,10 @@
1620
  }
1621
  }
1622
 
 
 
 
 
1623
  // Generate Policy action
1624
  $('#generate-access-policy').bind('click', function() {
1625
  const btn = $('i', '#policy-generator');
@@ -2078,7 +2090,7 @@
2078
  var _this = $(this);
2079
  save(
2080
  [$(this).data('metabox')],
2081
- $(this).attr('checked') ? 1 : 0,
2082
  function (result) {
2083
  if (result.status === 'success') {
2084
  $('#aam-metabox-overwrite').show();
@@ -3474,7 +3486,7 @@
3474
  * @param {type} value
3475
  * @returns {undefined}
3476
  */
3477
- function save(param, value) {
3478
  getAAM().queueRequest(function () {
3479
  $.ajax(getLocal().ajaxurl, {
3480
  type: 'POST',
@@ -3488,6 +3500,11 @@
3488
  param: param,
3489
  value: value
3490
  },
 
 
 
 
 
3491
  error: function () {
3492
  getAAM().notification('danger');
3493
  }
@@ -3506,13 +3523,21 @@
3506
  $('input[type="radio"]', container).each(function () {
3507
  $(this).bind('click', function () {
3508
  //hide group
3509
- $('.aam-404redirect-action').hide();
3510
 
3511
  //show the specific one
3512
  $($(this).data('action')).show();
3513
 
3514
  //save redirect type
3515
- save($(this).attr('name'), $(this).val());
 
 
 
 
 
 
 
 
3516
  });
3517
  });
3518
 
@@ -3522,6 +3547,10 @@
3522
  save($(this).attr('name'), $(this).val());
3523
  });
3524
  });
 
 
 
 
3525
  }
3526
  }
3527
 
@@ -3547,7 +3576,7 @@
3547
  * @returns {undefined}
3548
  */
3549
  function save(type, route, method, btn) {
3550
- var value = $(btn).hasClass('icon-check-empty') ? 1 : 0;
3551
 
3552
  getAAM().queueRequest(function () {
3553
  //show indicator
@@ -3748,6 +3777,7 @@
3748
  success: function (response) {
3749
  if (response.status === 'success') {
3750
  $('#uri-list').DataTable().ajax.reload();
 
3751
  } else {
3752
  getAAM().notification(
3753
  'danger', getAAM().__('Failed to save URI rule')
@@ -3872,6 +3902,15 @@
3872
  }));
3873
  break;
3874
 
 
 
 
 
 
 
 
 
 
3875
  case 'delete':
3876
  $(container).append($('<i/>', {
3877
  'class': 'aam-row-action icon-trash-empty text-danger'
@@ -3884,6 +3923,15 @@
3884
  }));
3885
  break;
3886
 
 
 
 
 
 
 
 
 
 
3887
  default:
3888
  break;
3889
  }
222
  resetForm('#edit-role-modal .modal-body');
223
  $('#edit-role-btn').data('role', data[0]);
224
  $('#edit-role-name').val(data[2]);
225
+ $('#edit-role-slug').val(data[0]);
226
  $('#edit-role-modal').modal('show');
227
  fetchRoleList(data[0]);
228
 
229
+ if (data[1] > 0) {
230
+ $('#edit-role-slug').prop('disabled', true);
231
+ } else {
232
+ $('#edit-role-slug').prop('disabled', false);
233
+ }
234
+
235
  //TODO - Rewrite JavaScript to support $.aam
236
  $.aamEditRole = data;
237
 
375
  $('#add-role-modal').on('shown.bs.modal', function (e) {
376
  fetchRoleList();
377
  //clear add role form first
378
+ $('input', '#add-role-modal').val('').focus();
379
  });
380
 
381
  $('#edit-role-modal').on('shown.bs.modal', function (e) {
446
  var _this = this;
447
 
448
  $('#edit-role-name').parent().removeClass('has-error');
449
+ $('#edit-role-slug').parent().removeClass('has-error');
450
 
451
  var data = {
452
  action: 'aam',
476
  },
477
  success: function (response) {
478
  if (response.status === 'success') {
479
+ location.reload();
480
  } else {
481
  getAAM().notification(
482
  'danger', getAAM().__('Failed to update role')
1628
  }
1629
  }
1630
 
1631
+ $('#policy-generator').tooltip({
1632
+ container: 'body'
1633
+ });
1634
+
1635
  // Generate Policy action
1636
  $('#generate-access-policy').bind('click', function() {
1637
  const btn = $('i', '#policy-generator');
2090
  var _this = $(this);
2091
  save(
2092
  [$(this).data('metabox')],
2093
+ $(this).attr('checked'),
2094
  function (result) {
2095
  if (result.status === 'success') {
2096
  $('#aam-metabox-overwrite').show();
3486
  * @param {type} value
3487
  * @returns {undefined}
3488
  */
3489
+ function save(param, value, cb) {
3490
  getAAM().queueRequest(function () {
3491
  $.ajax(getLocal().ajaxurl, {
3492
  type: 'POST',
3500
  param: param,
3501
  value: value
3502
  },
3503
+ success: function (response) {
3504
+ if (typeof cb === 'function') {
3505
+ cb(response);
3506
+ }
3507
+ },
3508
  error: function () {
3509
  getAAM().notification('danger');
3510
  }
3523
  $('input[type="radio"]', container).each(function () {
3524
  $(this).bind('click', function () {
3525
  //hide group
3526
+ $('.404redirect-action').hide();
3527
 
3528
  //show the specific one
3529
  $($(this).data('action')).show();
3530
 
3531
  //save redirect type
3532
+ save(
3533
+ $(this).attr('name'),
3534
+ $(this).val(),
3535
+ function (result) {
3536
+ if (result.status === 'success') {
3537
+ $('#aam-404redirect-overwrite').show();
3538
+ }
3539
+ }
3540
+ );
3541
  });
3542
  });
3543
 
3547
  save($(this).attr('name'), $(this).val());
3548
  });
3549
  });
3550
+
3551
+ $('#404redirect-reset').bind('click', function () {
3552
+ getAAM().reset('Main_404Redirect.reset', $(this));
3553
+ });
3554
  }
3555
  }
3556
 
3576
  * @returns {undefined}
3577
  */
3578
  function save(type, route, method, btn) {
3579
+ var value = $(btn).hasClass('icon-check-empty');
3580
 
3581
  getAAM().queueRequest(function () {
3582
  //show indicator
3777
  success: function (response) {
3778
  if (response.status === 'success') {
3779
  $('#uri-list').DataTable().ajax.reload();
3780
+ $('#aam-uri-overwrite').show();
3781
  } else {
3782
  getAAM().notification(
3783
  'danger', getAAM().__('Failed to save URI rule')
3902
  }));
3903
  break;
3904
 
3905
+ case 'no-edit':
3906
+ $(container).append($('<i/>', {
3907
+ 'class': 'aam-row-action icon-pencil text-muted'
3908
+ }).attr({
3909
+ 'data-toggle': "tooltip",
3910
+ 'title': getAAM().__('Inherited')
3911
+ }));
3912
+ break;
3913
+
3914
  case 'delete':
3915
  $(container).append($('<i/>', {
3916
  'class': 'aam-row-action icon-trash-empty text-danger'
3923
  }));
3924
  break;
3925
 
3926
+ case 'no-delete':
3927
+ $(container).append($('<i/>', {
3928
+ 'class': 'aam-row-action icon-trash-empty text-muted'
3929
+ }).attr({
3930
+ 'data-toggle': "tooltip",
3931
+ 'title': getAAM().__('Inherited')
3932
+ }));
3933
+ break;
3934
+
3935
  default:
3936
  break;
3937
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: access control, membership, backend menu, user role, restricted content, s
4
  Requires at least: 4.7.0
5
  Requires PHP: 5.6.0
6
  Tested up to: 5.3.2
7
- Stable tag: 6.3.3
8
 
9
  All you need to manage access to WordPress websites on the frontend, backend and API levels for any role, user or visitors.
10
 
@@ -91,6 +91,33 @@ We take security and privacy very seriously, that is why there are several non-n
91
 
92
  == Changelog ==
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  = 6.3.3 =
95
  * Change: Updated core to allow geolocation functionality with IP Check
96
  * Change: Enhanced [IP Check](https://aamplugin.com/pricing/ip-check) add-on with ability to define geolocation rules [https://aamplugin.com/article/how-to-manage-access-to-wordpress-website-based-on-location](https://aamplugin.com/article/how-to-manage-access-to-wordpress-website-based-on-location)
4
  Requires at least: 4.7.0
5
  Requires PHP: 5.6.0
6
  Tested up to: 5.3.2
7
+ Stable tag: 6.4.0
8
 
9
  All you need to manage access to WordPress websites on the frontend, backend and API levels for any role, user or visitors.
10
 
91
 
92
  == Changelog ==
93
 
94
+ = 6.4.0 =
95
+ * Fixed Bug: URI Access: Changing existing URI rule puts it in the end of the list [https://github.com/aamplugin/advanced-access-manager/issues/74](https://github.com/aamplugin/advanced-access-manager/issues/74)
96
+ * Fixed Bug: URI Access: Incorrect handling of the inherited rules [https://github.com/aamplugin/advanced-access-manager/issues/77](https://github.com/aamplugin/advanced-access-manager/issues/77)
97
+ * Fixed Bug: CSS issue with add-on button when it is inactive [https://github.com/aamplugin/advanced-access-manager/issues/78](https://github.com/aamplugin/advanced-access-manager/issues/78)
98
+ * Fixed Bug: IP Check add-on: Failure to delete rules [https://github.com/aamplugin/advanced-access-manager/issues/65](https://github.com/aamplugin/advanced-access-manager/issues/65)
99
+ * Fixed Bug: IP Check add-on: Incorrectly evaluated multiple rules [https://github.com/aamplugin/advanced-access-manager/issues/66](https://github.com/aamplugin/advanced-access-manager/issues/66)
100
+ * Fixed Bug: Plus Package add-on: Warning: Invalid argument supplied for foreach() in ...ContentHooks.php on line 800 [https://github.com/aamplugin/advanced-access-manager/issues/73](https://github.com/aamplugin/advanced-access-manager/issues/73)
101
+ * Fixed Bug: Plus Package add-on: Terms & Taxonomies settings take effect when Post & Terms service is off [https://github.com/aamplugin/advanced-access-manager/issues/69](https://github.com/aamplugin/advanced-access-manager/issues/69)
102
+ * Added New: Plus Package add-on: Support for the "ADD NEW" term access option to access policy [https://github.com/aamplugin/advanced-access-manager/issues/57](https://github.com/aamplugin/advanced-access-manager/issues/57)
103
+ * Added New: Plus Package add-on: Wildcard support for the API Routes in access policies [https://github.com/aamplugin/advanced-access-manager/issues/56](https://github.com/aamplugin/advanced-access-manager/issues/56)
104
+ * Added New: Plus Package add-on: More granular access to taxonomy/term visibility [https://github.com/aamplugin/advanced-access-manager/issues/54](https://github.com/aamplugin/advanced-access-manager/issues/54)
105
+ * Added New: IP Check add-on: Integration with Access Policy [https://github.com/aamplugin/advanced-access-manager/issues/68](https://github.com/aamplugin/advanced-access-manager/issues/68)
106
+ * Added New: The ability to define "Access Denied Redirect" rules with access policy [https://github.com/aamplugin/advanced-access-manager/issues/61](https://github.com/aamplugin/advanced-access-manager/issues/61)
107
+ * Added New: The ability to define "Login Redirect" rules with access policy [https://github.com/aamplugin/advanced-access-manager/issues/62](https://github.com/aamplugin/advanced-access-manager/issues/62)
108
+ * Added New: The ability to define "Logout Redirect" rules with access policy [https://github.com/aamplugin/advanced-access-manager/issues/63](https://github.com/aamplugin/advanced-access-manager/issues/63)
109
+ * Added New: The ability to define "404 Redirect" rules with access policy [https://github.com/aamplugin/advanced-access-manager/issues/64](https://github.com/aamplugin/advanced-access-manager/issues/64)
110
+ * Added New: Allow the ability to programmatically get AAM service [https://github.com/aamplugin/advanced-access-manager/issues/71](https://github.com/aamplugin/advanced-access-manager/issues/71)
111
+ * Added New: The ability to change role's slug [https://github.com/aamplugin/advanced-access-manager/issues/72](https://github.com/aamplugin/advanced-access-manager/issues/72)
112
+ * Added New: The ability to issue refreshable JWT token through RESTful API [https://github.com/aamplugin/advanced-access-manager/issues/16](https://github.com/aamplugin/advanced-access-manager/issues/16)
113
+ * Added New: The "Manage Access" toolbar menu item [https://github.com/aamplugin/advanced-access-manager/issues/26](https://github.com/aamplugin/advanced-access-manager/issues/26)
114
+ * Added New: AAM [WP-CLI add-on](https://github.com/aamplugin/aam-cli). Allows to install premium AAM add-ons and access policies. Check [for more details](https://aamplugin.com/reference/plugin#wp-cli-commands)
115
+ * Changed: Use slugs instead of post/term IDs during policy generation [https://github.com/aamplugin/advanced-access-manager/issues/80](https://github.com/aamplugin/advanced-access-manager/issues/80)
116
+ * Changed: Policy Generate button does not have tooltip [https://github.com/aamplugin/advanced-access-manager/issues/79](https://github.com/aamplugin/advanced-access-manager/issues/79)
117
+ * Changed: Access Policy Generator split across services [https://github.com/aamplugin/advanced-access-manager/issues/76](https://github.com/aamplugin/advanced-access-manager/issues/76)
118
+ * Changed: Enhanced AAM API [https://github.com/aamplugin/advanced-access-manager/issues/75](https://github.com/aamplugin/advanced-access-manager/issues/75)
119
+ * Changed: The 404 (Not Found) Redirect now is allowed to be customized per user and role [https://github.com/aamplugin/advanced-access-manager/issues/64](https://github.com/aamplugin/advanced-access-manager/issues/64)
120
+
121
  = 6.3.3 =
122
  * Change: Updated core to allow geolocation functionality with IP Check
123
  * Change: Enhanced [IP Check](https://aamplugin.com/pricing/ip-check) add-on with ability to define geolocation rules [https://aamplugin.com/article/how-to-manage-access-to-wordpress-website-based-on-location](https://aamplugin.com/article/how-to-manage-access-to-wordpress-website-based-on-location)