Version Description
- Fixed the bug that is caused by other plugins not using core filters correctly
- Hiding Dashboard and Edit My Profile links if user does not have access to them *
Download this release
Release Info
Developer | vasyl_m |
Plugin | Advanced Access Manager |
Version | 5.0.7 |
Comparing to | |
See all releases |
Code changes from version 5.0.6 to 5.0.7
Application/Backend/Feature/Main/Post.php
CHANGED
@@ -359,7 +359,7 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
|
|
359 |
$id = AAM_Core_Request::post('id');
|
360 |
$access = $metadata = array();
|
361 |
$object = AAM_Backend_Subject::getInstance()->getObject($type, $id);
|
362 |
-
|
363 |
//prepare the response object
|
364 |
if (is_a($object, 'AAM_Core_Object')) {
|
365 |
foreach($object->getOption() as $key => $value) {
|
359 |
$id = AAM_Core_Request::post('id');
|
360 |
$access = $metadata = array();
|
361 |
$object = AAM_Backend_Subject::getInstance()->getObject($type, $id);
|
362 |
+
|
363 |
//prepare the response object
|
364 |
if (is_a($object, 'AAM_Core_Object')) {
|
365 |
foreach($object->getOption() as $key => $value) {
|
Application/Backend/phtml/widget/login-frontend.phtml
CHANGED
@@ -50,8 +50,11 @@
|
|
50 |
<?php echo get_avatar(AAM::getUser()->ID, "50"); ?>
|
51 |
</div>
|
52 |
<div style="display:table-cell;">
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
55 |
<a href="<?php echo esc_url(wp_logout_url()); ?>"><?php echo __('Log Out'); ?></a>
|
56 |
</div>
|
57 |
</div>
|
50 |
<?php echo get_avatar(AAM::getUser()->ID, "50"); ?>
|
51 |
</div>
|
52 |
<div style="display:table-cell;">
|
53 |
+
<?php $allowAdmin = !AAM_Core_API::capabilityExists('access_dashboard') || AAM::getUser()->hasCapability('access_dashboard'); ?>
|
54 |
+
<?php if ($allowAdmin) { ?>
|
55 |
+
<a href="<?php echo esc_url(get_admin_url()); ?>"><?php echo __('Dashboard'); ?></a><br/>
|
56 |
+
<a href="<?php echo esc_url(get_admin_url(null, 'profile.php')); ?>"><?php echo __('Edit My Profile'); ?></a><br/>
|
57 |
+
<?php } ?>
|
58 |
<a href="<?php echo esc_url(wp_logout_url()); ?>"><?php echo __('Log Out'); ?></a>
|
59 |
</div>
|
60 |
</div>
|
Application/Core/API.php
CHANGED
@@ -215,7 +215,7 @@ final class AAM_Core_API {
|
|
215 |
public static function capabilityExists($cap) {
|
216 |
$caps = self::getAllCapabilities();
|
217 |
|
218 |
-
return (array_key_exists($cap, $caps) ? true : false);
|
219 |
}
|
220 |
|
221 |
/**
|
215 |
public static function capabilityExists($cap) {
|
216 |
$caps = self::getAllCapabilities();
|
217 |
|
218 |
+
return (is_scalar($cap) && array_key_exists($cap, $caps) ? true : false);
|
219 |
}
|
220 |
|
221 |
/**
|
Application/Frontend/phtml/login.phtml
CHANGED
@@ -37,8 +37,11 @@
|
|
37 |
<?php echo get_avatar(AAM::getUser()->ID, "200"); ?>
|
38 |
</div>
|
39 |
<div>
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
42 |
<a href="<?php echo esc_url(wp_logout_url()); ?>"><?php echo __('Log Out'); ?></a>
|
43 |
</div>
|
44 |
</div>
|
37 |
<?php echo get_avatar(AAM::getUser()->ID, "200"); ?>
|
38 |
</div>
|
39 |
<div>
|
40 |
+
<?php $allowAdmin = !AAM_Core_API::capabilityExists('access_dashboard') || AAM::getUser()->hasCapability('access_dashboard'); ?>
|
41 |
+
<?php if ($allowAdmin) { ?>
|
42 |
+
<a href="<?php echo esc_url(get_admin_url()); ?>"><?php echo __('Dashboard'); ?></a> |
|
43 |
+
<a href="<?php echo esc_url(get_admin_url(null, 'profile.php')); ?>"><?php echo __('Edit My Profile', AAM_KEY); ?></a> |
|
44 |
+
<?php } ?>
|
45 |
<a href="<?php echo esc_url(wp_logout_url()); ?>"><?php echo __('Log Out'); ?></a>
|
46 |
</div>
|
47 |
</div>
|
aam.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
Plugin Name: Advanced Access Manager
|
5 |
Description: All you need to manage access to your WordPress website
|
6 |
-
Version: 5.0.
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://vasyltech.com
|
9 |
|
3 |
/**
|
4 |
Plugin Name: Advanced Access Manager
|
5 |
Description: All you need to manage access to your WordPress website
|
6 |
+
Version: 5.0.7
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://vasyltech.com
|
9 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: vasyltech
|
|
3 |
Tags: access, role, user, capability, page access, post access, comments, security, login redirect, brute force attack, double authentication, membership, backend lockdown, wp-admin, 404, activity tracking
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.9.1
|
6 |
-
Stable tag: 5.0.
|
7 |
|
8 |
The most powerful access management plugin for WordPress websites.
|
9 |
|
@@ -60,6 +60,11 @@ https://www.youtube.com/watch?v=yiOhjaacNJc
|
|
60 |
|
61 |
== Changelog ==
|
62 |
|
|
|
|
|
|
|
|
|
|
|
63 |
= 5.0.6 =
|
64 |
* Fixed several minor PHP errors caused by legacy PHP versions and corrupted data
|
65 |
* Another boost to the AAM performance
|
3 |
Tags: access, role, user, capability, page access, post access, comments, security, login redirect, brute force attack, double authentication, membership, backend lockdown, wp-admin, 404, activity tracking
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.9.1
|
6 |
+
Stable tag: 5.0.7
|
7 |
|
8 |
The most powerful access management plugin for WordPress websites.
|
9 |
|
60 |
|
61 |
== Changelog ==
|
62 |
|
63 |
+
= 5.0.7 =
|
64 |
+
* Fixed the bug that is caused by other plugins not using core filters correctly
|
65 |
+
* Hiding Dashboard and Edit My Profile links if user does not have access to them
|
66 |
+
*
|
67 |
+
|
68 |
= 5.0.6 =
|
69 |
* Fixed several minor PHP errors caused by legacy PHP versions and corrupted data
|
70 |
* Another boost to the AAM performance
|