mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Removed NEW_ADMIN_URL setting
This commit is contained in:
@@ -204,19 +204,6 @@ relative URL of your logo under ``MEDIA_URL``. For example::
|
||||
Then copy your logo file into the directory indicated by
|
||||
``MEDIA_ROOT``.
|
||||
|
||||
Custom new admin sub-url
|
||||
========================
|
||||
|
||||
You can edit the new admin sub-url (by default it is `/new-admin`).
|
||||
|
||||
To do so, open the :file:`settings.py` file and add (or uncomment)
|
||||
``NEW_ADMIN_URL`` variable. This variable must contain a relative url
|
||||
without initial and last `'/'`. For example::
|
||||
|
||||
NEW_ADMIN_URL = 'test_admin'
|
||||
|
||||
You will need to change you web server accordingly and rebuild the frontend.
|
||||
|
||||
******************
|
||||
Host configuration
|
||||
******************
|
||||
|
||||
@@ -194,6 +194,7 @@ Required changes to :file:`settings.py`
|
||||
'modoboa.lib.middleware.RequestCatcherMiddleware',
|
||||
)
|
||||
|
||||
- Remove ``NEW_ADMIN_URL`` variable
|
||||
|
||||
|
||||
Version 2.3.3
|
||||
|
||||
@@ -234,9 +234,6 @@ REST_FRAMEWORK = {
|
||||
|
||||
}
|
||||
|
||||
# Uncomment if you need a custom sub url for new_admin interface
|
||||
# NEW_ADMIN_URL = 'new-admin'
|
||||
|
||||
SPECTACULAR_SETTINGS = {
|
||||
'SCHEMA_PATH_PREFIX': r'/api/v[0-9]',
|
||||
'TITLE': 'Modoboa API',
|
||||
|
||||
@@ -113,8 +113,7 @@ class Command(BaseCommand):
|
||||
if not allowed_host:
|
||||
allowed_host = "localhost"
|
||||
frontend_application = app_model.objects.filter(name="modoboa_frontend")
|
||||
frontend_path = getattr(settings, "NEW_ADMIN_URL", "new-admin")
|
||||
base_uri = f"https://{allowed_host}/{frontend_path}"
|
||||
base_uri = f"https://{allowed_host}"
|
||||
redirect_uri = f"{base_uri}/login/logged"
|
||||
client_id = ""
|
||||
if not frontend_application.exists():
|
||||
@@ -136,7 +135,11 @@ class Command(BaseCommand):
|
||||
"authorization-code",
|
||||
)
|
||||
else:
|
||||
client_id = frontend_application.first().client_id
|
||||
app = frontend_application.first()
|
||||
app.redirect_uris = redirect_uri
|
||||
app.post_logout_redirect_urls = base_uri
|
||||
app.save()
|
||||
client_id = app.client_id
|
||||
|
||||
base_frontend_dir = os.path.join(
|
||||
os.path.dirname(__file__), "../../../frontend_dist/"
|
||||
|
||||
@@ -246,9 +246,6 @@ REST_FRAMEWORK = {
|
||||
"DEFAULT_VERSIONING_CLASS": "rest_framework.versioning.NamespaceVersioning",
|
||||
}
|
||||
|
||||
# Uncomment if you need a custom sub url for new_admin interface
|
||||
# NEW_ADMIN_URL = 'new-admin'
|
||||
|
||||
SPECTACULAR_SETTINGS = {
|
||||
"SCHEMA_PATH_PREFIX": r"/api/v[0-9]",
|
||||
"TITLE": "Modoboa API",
|
||||
|
||||
Reference in New Issue
Block a user