Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow override of the no permissions view #445

Merged

Conversation

ddouglascarr
Copy link
Contributor

Implements #440

This PR adds an EXPLORER_NO_PERMISSION_VIEW configuration option. Library consumers can set this to render custom view when users does not have permission to view a page within explorer. If the option is not set, the existing SafeLoginView is used.

The library consumer can simply return a redirect from that view, or, they can handle logged in and anonymous users differently.

The option is a view path (e.g. consumerapp.mymodule.myfiewfunc), and the custom view has to be function based. This required wrapping the class based SafeLoginView. Let me know if you'd like this done differently, we're happy to implement it however you think would best fit with the app.

@marksweb marksweb merged commit 6f110bf into chrisclark:master Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants