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

ADMIN_ENABLE variable not used #1039

Open
eduramiba opened this issue Jul 20, 2021 · 3 comments
Open

ADMIN_ENABLE variable not used #1039

eduramiba opened this issue Jul 20, 2021 · 3 comments

Comments

@eduramiba
Copy link

Version

21.7.0

Steps to Reproduce

Setting variable ADMIN_ENABLE = False does not disable the Django admin panel.

Django.contrib.admin is unconditionally added here (https://github.com/getsentry/sentry/blob/a741ce3cadef2537932e9d1262a723b9559bd738/src/sentry/conf/server.py#L322) but should not be.

Thank you,
Eduardo

Expected Result

The admin panel should not be available.

Actual Result

The admin panel is available.

@chadwhitacre
Copy link
Member

Seems legit, but on the other hand I reeeeeeally don't think we have the admin panel in SaaS. How do we prevent it from showing up there? Does that give us a clue for how to disable in self-hosted?

@eduramiba
Copy link
Author

Seems legit, but on the other hand I reeeeeeally don't think we have the admin panel in SaaS. How do we prevent it from showing up there? Does that give us a clue for how to disable in self-hosted?

On self-hosted I had to manually edit the server.py file inside the web docker image and it worked.

@chadwhitacre
Copy link
Member

Yeah, I think for SaaS we're turning off the admin in our private getsentry wrapper.

For self-hosted, urls.py in sentry doesn't give us anything, it goes off INSTALLED_APPS.

Seems like a valid ask, @eduramiba, thanks for the ticket.

@BYK BYK self-assigned this Jul 26, 2021
@BYK BYK removed their assignment Oct 15, 2021
hubertdeng123 pushed a commit to getsentry/sentry that referenced this issue Jul 10, 2023
Disable django_admin on prod ,fix #23742 ,
getsentry/self-hosted#1039

cc @BYK 

### Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

4 participants