Fixed #6363 -- Refactored admin_view decorator#925
Closed
czpython wants to merge 2 commits intodjango:masterfrom
czpython:master
Closed
Fixed #6363 -- Refactored admin_view decorator#925czpython wants to merge 2 commits intodjango:masterfrom czpython:master
czpython wants to merge 2 commits intodjango:masterfrom
czpython:master
Conversation
Created new admin template unauthorized_user.html to be displayed when the user is authenticated but is not authorized. Removed permission checking from the admin authentication form.
|
Pretty nice. |
Member
|
This no longer merges cleanly and needs tests and docs as you noted. Please open a new PR if you make those updates, thanks! |
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.
In order to decouple authorization from authentication, we created a separate template for the admin called "unauthorized_user.html", this template will be rendered when a user is not active or is not staff. It will also be rendered when the has_permission method returns False. This needs to be documented...