Version Description
- Fixed bug related to Media Access Control
- Fixed bug with cleaning user posts & pages cache after profile update
Download this release
Release Info
Developer | vasyl_m |
Plugin | Advanced Access Manager |
Version | 3.7.6 |
Comparing to | |
See all releases |
Code changes from version 3.7.5 to 3.7.6
- Application/Backend/Filter.php +0 -19
- Application/Backend/Manager.php +19 -0
- Application/Backend/phtml/utility.phtml +1 -1
- Application/Core/Media.php +32 -6
- aam.php +1 -1
- readme.txt +5 -41
Application/Backend/Filter.php
CHANGED
@@ -58,9 +58,6 @@ class AAM_Backend_Filter {
|
|
58 |
//some additional filter for user capabilities
|
59 |
add_filter('user_has_cap', array($this, 'checkUserCap'), 999, 4);
|
60 |
|
61 |
-
//user profile update action
|
62 |
-
add_action('profile_update', array($this, 'profileUpdate'));
|
63 |
-
|
64 |
//screen options & contextual help hooks
|
65 |
add_filter('screen_options_show_screen', array($this, 'screenOptions'));
|
66 |
add_filter('contextual_help', array($this, 'helpOptions'), 10, 3);
|
@@ -329,22 +326,6 @@ class AAM_Backend_Filter {
|
|
329 |
return $allCaps;
|
330 |
}
|
331 |
|
332 |
-
/**
|
333 |
-
* Profile update hook
|
334 |
-
*
|
335 |
-
* Clear user cache if profile updated
|
336 |
-
*
|
337 |
-
* @param int $user_id
|
338 |
-
*
|
339 |
-
* @return void
|
340 |
-
*
|
341 |
-
* @access public
|
342 |
-
*/
|
343 |
-
public function profileUpdate($user_id) {
|
344 |
-
$subject = new AAM_Core_Subject_User($user_id);
|
345 |
-
$subject->deleteOption('cache');
|
346 |
-
}
|
347 |
-
|
348 |
/**
|
349 |
*
|
350 |
* @param type $flag
|
58 |
//some additional filter for user capabilities
|
59 |
add_filter('user_has_cap', array($this, 'checkUserCap'), 999, 4);
|
60 |
|
|
|
|
|
|
|
61 |
//screen options & contextual help hooks
|
62 |
add_filter('screen_options_show_screen', array($this, 'screenOptions'));
|
63 |
add_filter('contextual_help', array($this, 'helpOptions'), 10, 3);
|
326 |
return $allCaps;
|
327 |
}
|
328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
/**
|
330 |
*
|
331 |
* @param type $flag
|
Application/Backend/Manager.php
CHANGED
@@ -54,6 +54,9 @@ class AAM_Backend_Manager {
|
|
54 |
//manager WordPress metaboxes
|
55 |
add_action("in_admin_header", array($this, 'initMetaboxes'), 999);
|
56 |
|
|
|
|
|
|
|
57 |
//extend post inline actions
|
58 |
add_filter('page_row_actions', array($this, 'postRowActions'), 10, 2);
|
59 |
add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2);
|
@@ -200,6 +203,22 @@ class AAM_Backend_Manager {
|
|
200 |
return $actions;
|
201 |
}
|
202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
/**
|
204 |
* Add "Manage Access" action
|
205 |
*
|
54 |
//manager WordPress metaboxes
|
55 |
add_action("in_admin_header", array($this, 'initMetaboxes'), 999);
|
56 |
|
57 |
+
//user profile update action
|
58 |
+
add_action('profile_update', array($this, 'profileUpdate'));
|
59 |
+
|
60 |
//extend post inline actions
|
61 |
add_filter('page_row_actions', array($this, 'postRowActions'), 10, 2);
|
62 |
add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2);
|
203 |
return $actions;
|
204 |
}
|
205 |
|
206 |
+
/**
|
207 |
+
* Profile update hook
|
208 |
+
*
|
209 |
+
* Clear user cache if profile updated
|
210 |
+
*
|
211 |
+
* @param int $user_id
|
212 |
+
*
|
213 |
+
* @return void
|
214 |
+
*
|
215 |
+
* @access public
|
216 |
+
*/
|
217 |
+
public function profileUpdate($user_id) {
|
218 |
+
$subject = new AAM_Core_Subject_User($user_id);
|
219 |
+
$subject->deleteOption('cache');
|
220 |
+
}
|
221 |
+
|
222 |
/**
|
223 |
* Add "Manage Access" action
|
224 |
*
|
Application/Backend/phtml/utility.phtml
CHANGED
@@ -51,7 +51,7 @@
|
|
51 |
</p>
|
52 |
</td>
|
53 |
<td>
|
54 |
-
<input data-toggle="toggle" data-on="<?php echo __('Enabled', AAM_KEY); ?>" data-off="<?php echo __('Disabled', AAM_KEY); ?>" type="checkbox" name="media-access-control" <?php echo (AAM_Core_Config::get('media-access-control',
|
55 |
</td>
|
56 |
</tr>
|
57 |
<?php do_action('aam-utilities-setting'); ?>
|
51 |
</p>
|
52 |
</td>
|
53 |
<td>
|
54 |
+
<input data-toggle="toggle" data-on="<?php echo __('Enabled', AAM_KEY); ?>" data-off="<?php echo __('Disabled', AAM_KEY); ?>" type="checkbox" name="media-access-control" <?php echo (AAM_Core_Config::get('media-access-control', false) ? 'checked' : ''); ?> />
|
55 |
</td>
|
56 |
</tr>
|
57 |
<?php do_action('aam-utilities-setting'); ?>
|
Application/Core/Media.php
CHANGED
@@ -33,9 +33,15 @@ class AAM_Core_Media {
|
|
33 |
*/
|
34 |
protected function __construct() {
|
35 |
if (AAM_Core_Request::get('aam-media')) {
|
36 |
-
|
37 |
-
|
38 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
}
|
41 |
}
|
@@ -59,9 +65,7 @@ class AAM_Core_Media {
|
|
59 |
$area = (is_admin() ? 'backend' : 'frontend');
|
60 |
|
61 |
if (empty($media) || !$media->has("{$area}.read")) {
|
62 |
-
|
63 |
-
echo file_get_contents(ABSPATH . $request);
|
64 |
-
exit;
|
65 |
} elseif (!empty($media)) {
|
66 |
AAM_Core_API::reject(
|
67 |
$area, array('object' => $media, 'action' => "{$area}.read")
|
@@ -70,6 +74,28 @@ class AAM_Core_Media {
|
|
70 |
}
|
71 |
}
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
/**
|
74 |
* Find media by URI
|
75 |
*
|
33 |
*/
|
34 |
protected function __construct() {
|
35 |
if (AAM_Core_Request::get('aam-media')) {
|
36 |
+
if (AAM_Core_Config::get('media-access-control', false)) {
|
37 |
+
$area = (is_admin() ? 'backend' : 'frontend');
|
38 |
+
if (AAM_Core_Config::get("{$area}-access-control", true)) {
|
39 |
+
$this->checkMediaAccess();
|
40 |
+
} else {
|
41 |
+
$this->printMedia();
|
42 |
+
}
|
43 |
+
} else {
|
44 |
+
$this->printMedia();
|
45 |
}
|
46 |
}
|
47 |
}
|
65 |
$area = (is_admin() ? 'backend' : 'frontend');
|
66 |
|
67 |
if (empty($media) || !$media->has("{$area}.read")) {
|
68 |
+
$this->printMedia($media);
|
|
|
|
|
69 |
} elseif (!empty($media)) {
|
70 |
AAM_Core_API::reject(
|
71 |
$area, array('object' => $media, 'action' => "{$area}.read")
|
74 |
}
|
75 |
}
|
76 |
|
77 |
+
/**
|
78 |
+
*
|
79 |
+
* @param type $media
|
80 |
+
*/
|
81 |
+
protected function printMedia($media = null) {
|
82 |
+
$abspath = str_replace('\\', '/', ABSPATH);
|
83 |
+
$request = AAM_Core_Request::server('REQUEST_URI');
|
84 |
+
|
85 |
+
if (is_null($media)) {
|
86 |
+
$media = $this->findMedia($request);
|
87 |
+
}
|
88 |
+
|
89 |
+
if (!empty($media)) {
|
90 |
+
@header('Content-Type: ' . $media->post_mime_type);
|
91 |
+
}
|
92 |
+
|
93 |
+
if (@is_readable($abspath . $request)) {
|
94 |
+
echo file_get_contents($abspath . $request);
|
95 |
+
}
|
96 |
+
exit;
|
97 |
+
}
|
98 |
+
|
99 |
/**
|
100 |
* Find media by URI
|
101 |
*
|
aam.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
Plugin Name: Advanced Access Manager
|
5 |
Description: Manage User and Role Access to WordPress Backend and Frontend.
|
6 |
-
Version: 3.7.
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://www.vasyltech.com
|
9 |
|
3 |
/**
|
4 |
Plugin Name: Advanced Access Manager
|
5 |
Description: Manage User and Role Access to WordPress Backend and Frontend.
|
6 |
+
Version: 3.7.6
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://www.vasyltech.com
|
9 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: vasyltech
|
|
3 |
Tags: access, role, user, visitor, capability, page, post, permission, security, redirect
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.6
|
6 |
-
Stable tag: 3.7.
|
7 |
|
8 |
One of the best tools in WordPress repository to manage access to your posts,
|
9 |
pages, categories and backend area for users, roles and visitors.
|
@@ -64,6 +64,10 @@ out more about the Advanced Access Manager.
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
|
|
67 |
= 3.7.5 =
|
68 |
* Added AAM Content Teaser extension
|
69 |
* Added LIMIT option to Posts & Pages access forms to support Teaser feature
|
@@ -337,23 +341,6 @@ out more about the Advanced Access Manager.
|
|
337 |
* Introduced Development License
|
338 |
* Minor internal adjustment for AAM Development Community
|
339 |
|
340 |
-
= 2.5 Beta =
|
341 |
-
* Refactored Post & Pages Access List
|
342 |
-
* Extended ConfigPress with Post & Pages Access List Options
|
343 |
-
* Refactored internal UI hander
|
344 |
-
* Fixed issue with Restore Default flag and AAM Plus Package
|
345 |
-
* Added LIST Restriction for AAM Plus Package
|
346 |
-
* Added ADD Restriction for AAM Plus Package
|
347 |
-
* Filter list of editable roles based on current user level
|
348 |
-
* Gives ability for non-admin users manage AAM if admin granted access
|
349 |
-
* Removed Backup object. Replaces with Restore Default
|
350 |
-
* Merged ajax handler with UI manager
|
351 |
-
* Implemented Clear All Settings feature (one step closer to Import/Export)
|
352 |
-
* Added Error notification for Extension page
|
353 |
-
* Fixed bug with Multisite and AAM Plus Package ajax call
|
354 |
-
* Regenerated language file
|
355 |
-
* Fixed bug with non-existing term
|
356 |
-
|
357 |
= 2.4 =
|
358 |
* Added Norwegian language Norwegian (by Christer Berg Johannesen)
|
359 |
* Localize the default Roles
|
@@ -368,22 +355,6 @@ out more about the Advanced Access Manager.
|
|
368 |
* Added Inherit Capabilities From Role drop-down on Add New Role Dialog
|
369 |
* Small Cosmetic CSS changes
|
370 |
|
371 |
-
= 2.2.3 =
|
372 |
-
* Improved Admin Menu access control
|
373 |
-
* Extended ConfigPress with aam.menu.undefined setting
|
374 |
-
* Fixed issue with Frontend Widget
|
375 |
-
* Updated Polish Language File
|
376 |
-
|
377 |
-
= 2.2.2 =
|
378 |
-
* Fixed very significant issue with Role deletion
|
379 |
-
* Added Unfiltered Capability checkbox
|
380 |
-
* Regenerated language file
|
381 |
-
* Fixed issue with language encoding
|
382 |
-
* Fixed issue with Metaboxes tooltips
|
383 |
-
|
384 |
-
= 2.2.1 =
|
385 |
-
* Fixed the issue with Activity include
|
386 |
-
|
387 |
= 2.2 =
|
388 |
* Fixed issue with jQuery UI Tooltip Widget
|
389 |
* Added AAM Warning Panel
|
@@ -399,13 +370,6 @@ out more about the Advanced Access Manager.
|
|
399 |
* Increased the number of saved restriction for basic version
|
400 |
* Simplified Undo feature
|
401 |
|
402 |
-
= 2.1.1 =
|
403 |
-
* Fixed fatal error in caching mechanism
|
404 |
-
* Extended ConfigPress tutorial
|
405 |
-
* Fixed error for AAM Plus Package for PHP earlier versions
|
406 |
-
* Improved Admin over SSL check
|
407 |
-
* Improved Taxonomy Query handling mechanism
|
408 |
-
|
409 |
= 2.1 =
|
410 |
* Fixed issue with Admin Menu restrictions (thanks to MikeB2B)
|
411 |
* Added Polish Translation
|
3 |
Tags: access, role, user, visitor, capability, page, post, permission, security, redirect
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.6
|
6 |
+
Stable tag: 3.7.6
|
7 |
|
8 |
One of the best tools in WordPress repository to manage access to your posts,
|
9 |
pages, categories and backend area for users, roles and visitors.
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 3.7.6 =
|
68 |
+
* Fixed bug related to Media Access Control
|
69 |
+
* Fixed bug with cleaning user posts & pages cache after profile update
|
70 |
+
|
71 |
= 3.7.5 =
|
72 |
* Added AAM Content Teaser extension
|
73 |
* Added LIMIT option to Posts & Pages access forms to support Teaser feature
|
341 |
* Introduced Development License
|
342 |
* Minor internal adjustment for AAM Development Community
|
343 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
= 2.4 =
|
345 |
* Added Norwegian language Norwegian (by Christer Berg Johannesen)
|
346 |
* Localize the default Roles
|
355 |
* Added Inherit Capabilities From Role drop-down on Add New Role Dialog
|
356 |
* Small Cosmetic CSS changes
|
357 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
= 2.2 =
|
359 |
* Fixed issue with jQuery UI Tooltip Widget
|
360 |
* Added AAM Warning Panel
|
370 |
* Increased the number of saved restriction for basic version
|
371 |
* Simplified Undo feature
|
372 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
373 |
= 2.1 =
|
374 |
* Fixed issue with Admin Menu restrictions (thanks to MikeB2B)
|
375 |
* Added Polish Translation
|