-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Permissions: normalize for_site() usage for _metabox() and save() (#73)
This change fixes a bug causing User Roles to be incorrectly set when saving the "Permissions" tab on multisite installations. It also shifts the order of switch_to_blog() and current_user_can() calls, to ensure that Roles are only saved when the current user can "promote_users" on the current site for the user being edited (never self!) It also also includes a little bit of surrounding code clean-up while I'm here. Props chrisvanpatten. Fixes #70.
- Loading branch information
Showing
3 changed files
with
58 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters