Repository navigation
Do not let an admin shut themselves out of the admin panel - #1126
Open
KrzysztofPajak wants to merge 1 commit into
Open
KrzysztofPajak wants to merge 1 commit into
KrzysztofPajak wants to merge 1 commit into
Conversation
Saving the permission page with the admin's own groups unchecked took away the admin panel and the permission page from everyone who could give them back, and an allowed IP list for the admin area without the address the admin saves from shut them out at the next request. The permission page now refuses a save that leaves the saving admin without the admin panel or the permissions, and the general settings keep the old IP list, with a message, when the new one leaves out the admin's address; the other settings are still saved.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type: bugfix
Issue
An admin could shut themselves (and everyone in their group) out of the admin panel with an ordinary save:
AccessAdminPanelandManageACLfrom the group, so nobody left could open the panel or give them back.Solution
AccessAdminPanelorManageACLthrough any of their active groups. Nothing is written, and a message explains why.RemoteIpAddressthe admin filter checks), with a message; the other settings of the page are saved as usual. A list that includes the address, or an empty list, is saved as before.New resources
Admin.Configuration.Permissions.CantRemoveOwnAccessandAdmin.Settings.GeneralCommon.AdminAreaAllowedIpAddresses.WithoutOwninDefaultLanguage.xmlandUpgrade/en_250.xml.Breaking changes
None. Behind a proxy without forwarded headers the address checked is the proxy's, as it already was for the admin filter.
Testing
10.9.8.7and save: the list is not changed, a message names your address, the admin panel still opens.::1, 127.0.0.1) and save: it is saved. Clear it again.PermissionControllerTestscovers the refused saves and a save that keeps the own access.