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

Overriding Login View #440

Closed
dannyshaw opened this issue May 4, 2021 · 6 comments
Closed

Overriding Login View #440

dannyshaw opened this issue May 4, 2021 · 6 comments
Assignees

Comments

@dannyshaw
Copy link

We have a custom login that enforces Google Auth. However attempting to access explorer allows a login without auth via the SafeLoginView.

There doesn't appear to be a way to specify a custom login view/redirect?
If not would you accept a PR implementing an override?

@marksweb
Copy link
Collaborator

marksweb commented May 4, 2021

Hi @dannyshaw, I'd be happy for a PR for this 👍

@sunjiali
Copy link

sunjiali commented May 31, 2021

Hi @dannyshaw,

Are you working on this PR?

@dannyshaw
Copy link
Author

Hi @sunjiali, we're working on this issue in our current sprint (well, @ddouglascarr is)

We're not totally sure what direction you'd want to take this as repo owner. For our purposes just allowing a view to be provided in settings that will be returned when handle_no_permission() is called on will suffice.

@ddouglasscarr will raise a PR once the approach we're taking is implemented on our fork.

@sunjiali
Copy link

sunjiali commented Jun 1, 2021

Hi @dannyshaw,

I have custom login and I am not use django admin. Maybe same with you.

So could you share the code of allowing a view to be provided in settings that will be returned when handle_no_permission() is called on will suffice. I am not familiar with django-sql-explorer.

Thanks

@marksweb
Copy link
Collaborator

marksweb commented Jun 1, 2021

Hi @dannyshaw @ddouglascarr

If you had this has a setting which would load your preferred view or default to SafeLoginView then I think that'd be most suitable.

@marksweb
Copy link
Collaborator

This has been included in 2.2 which I've just released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants