Comments (4)
Thanx for addressing this.
For others, the underlying issue is as follows:
when VAA is run in a multisite environment and the current user is a super admin, if some other plugin has hooked into user_has_cap
and the hooked function modifies a user's capabilities based on that users role, then that function hooked to user_has_cap
never gets called when "Viewing as role"...because WP Core's WP_User::has_cap()
short circuits when the current user is a super admin.
from view-admin-as.
Please check the latest dev branch for the fix!
https://github.com/JoryHogeveen/view-admin-as/tree/dev
PR: #54
I actually did what I proposed above (and I now see you proposed something quite similar in your plugin comments).
You can review the changes in the PR.
It's way more logical to run the user_has_cap filter at the beginning so all other plugins can run their filters based on the modified user. (I actually make temporarily changes to the current user when viewing as a role or with modified capabilities).
I've also applied the user_has_cap
filter within the map_meta_cap
filter to make sure these capability changes apply here as well for super admins.
Thanks again for your input.
from view-admin-as.
Already found the first issue.
When you are not a super admin but this plugin is still activated through the view_admin_as
capability "Restrict User Access" overwrites our the full list of capabilities (priority 9).
Related: intoxstudio/restrict-user-access#11
from view-admin-as.
@pbiron
If you have the time, please confirm the current dev branch status fixes your problem 100%.
1.7.2-rc1 is done.
PS: Since it's related, what is your opinion on #53?
from view-admin-as.
Related Issues (20)
- Enable VAA menu to differents user's roles, as well as Admin do HOT 3
- Role Defaults: Compatibility issue with TinyMCE Advanced
- Role Manager: Reload if in user view and the user's Role has been modified
- Use namespaces (PHP 5.3)
- Fetch Google Site Kit capabilities
- do_shortcode: switch to using apply_shortcodes instead
- Conflict with User Role Editor filter HOT 3
- Integrate with Simple History HOT 6
- Multi-Site Lost Functionality HOT 6
- Theme switcher
- Toolbar gets rendered on MetaSlider preview
- Adds own canonical even though other plugins might already have. HOT 10
- Frontend adminbar CSS HOT 2
- Compatability Issue/Request: Ultimate Member HOT 1
- RTL support
- Switch to RTL view
- Allow Admins to View As other Admins, Override the "Equal Roles" Check HOT 2
- Compatibility with WP Rocket logged-in user cache HOT 13
- Compatibility with Pantheon in Git mode HOT 2
- FireFox hides menu when hovering over select options HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from view-admin-as.