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

Settings toggle for html frontend needed #862

Open
hmpf opened this issue Aug 21, 2024 · 3 comments
Open

Settings toggle for html frontend needed #862

hmpf opened this issue Aug 21, 2024 · 3 comments
Labels
auth Touches the authentication/authorization subsystem blocked Another thing/issue has to be resolved before tackling this new setting Needs a new setting in settings.py, possibly with validator rc-future

Comments

@hmpf
Copy link
Contributor

hmpf commented Aug 21, 2024

While we are developing the html frontend we have been using the OVERRIDING_APPS/EXTRA_APPS functionality to test the new functionality, but that will be too complex for a production deployment. We'd rather have a single setting that turns the html frontend on and off. This issue is to help us keep track of what needs doing.

@hmpf
Copy link
Contributor Author

hmpf commented Aug 21, 2024

EXTRA_APPS is currently:

[
  {
    "app_name": "django_htmx",
    "middleware": {
      "django_htmx.middleware.HtmxMiddleware": "end"
    }
  },
  {
    "app_name": "argus_htmx",
    "urls": {
      "path": "",
      "urlpatterns_module": "argus_htmx.urls"
    },
    "context_processors": [
      "argus_htmx.context_processors.theme_via_session"
    ],
    "middleware": {
      "argus_htmx.middleware.LoginRequiredMiddleware": "end"
    }
  },
  {
    "app_name": "debug_toolbar",
    "urls": {
      "path": "__debug__/",
      "urlpatterns_module": "debug_toolbar.urls"
    }
  },
  {
    "app_name": "template_partials"
  }
]

OVRRIDING_APPS is not used. Supporting debug_toolbar is not part of this issue.

@hmpf
Copy link
Contributor Author

hmpf commented Aug 21, 2024

Settings needed so far are:

LOGIN_URL = "/accounts/login"
LOGIN_REDIRECT_URL = "/incidents/"
PUBLIC_URLS = [
    "/accounts/login/",
    "/api/",
]

This differs from the react frontend which needs:

LOGIN_URL = "/login/"
LOGIN_REDIRECT_URL = "/"

(It will probably also be necessary to adapt how we do OAuth2 as we are still testing with local logins only.)

We might no longer need the magic in "argus.dataporten.social.DataportenFeideOAuth2" in AUTHENTICATION_BACKENDS.

@hmpf
Copy link
Contributor Author

hmpf commented Aug 21, 2024

Another question is whether we should still support the old frontend. I would prefer that we did not.

@hmpf hmpf added blocked Another thing/issue has to be resolved before tackling this auth Touches the authentication/authorization subsystem rc-future new setting Needs a new setting in settings.py, possibly with validator after-demo Need not work for demo labels Aug 21, 2024
@hmpf hmpf changed the title Toggle for html frontend needed Srttings toggle for html frontend needed Aug 21, 2024
@hmpf hmpf changed the title Srttings toggle for html frontend needed Settings toggle for html frontend needed Aug 21, 2024
@hmpf hmpf removed the after-demo Need not work for demo label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Touches the authentication/authorization subsystem blocked Another thing/issue has to be resolved before tackling this new setting Needs a new setting in settings.py, possibly with validator rc-future
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant