mirror of
https://github.com/sissbruecker/linkding.git
synced 2026-02-28 06:53:12 +08:00
Remove registration switch (#1268)
This commit is contained in:
@@ -136,9 +136,6 @@ REST_FRAMEWORK = {
|
||||
"PAGE_SIZE": 100,
|
||||
}
|
||||
|
||||
# Registration switch
|
||||
ALLOW_REGISTRATION = False
|
||||
|
||||
# URL validation flag
|
||||
LD_DISABLE_URL_VALIDATION = os.getenv("LD_DISABLE_URL_VALIDATION", False) in (
|
||||
True,
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
# Placeholder, can be mounted in a Docker container with a custom settings
|
||||
|
||||
# ALLOW_REGISTRATION = True
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{% extends 'shared/layout.html' %}
|
||||
{% block head %}
|
||||
{% with page_title="Registration complete - Linkding" %}{{ block.super }}{% endwith %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<main class="mx-auto width-50 width-md-100" aria-labelledby="main-heading">
|
||||
<div class="section-header">
|
||||
<h1 id="main-heading">Registration complete</h1>
|
||||
</div>
|
||||
<p class="text-success">You can now use the application.</p>
|
||||
</main>
|
||||
{% endblock %}
|
||||
@@ -1,39 +0,0 @@
|
||||
{% extends 'shared/layout.html' %}
|
||||
{% block head %}
|
||||
{% with page_title="Registration - Linkding" %}{{ block.super }}{% endwith %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<main class="mx-auto width-50 width-md-100" aria-labelledby="main-heading">
|
||||
<div class="section-header">
|
||||
<h1 id="main-heading">Register</h1>
|
||||
</div>
|
||||
<form method="post"
|
||||
action="{% url 'django_registration_register' %}"
|
||||
novalidate>
|
||||
{% csrf_token %}
|
||||
<div class="form-group {% if form.errors.username %}has-error{% endif %}">
|
||||
<label class="form-label" for="{{ form.username.id_for_label }}">Username</label>
|
||||
{{ form.username }}
|
||||
<div class="form-input-hint">{{ form.errors.username }}</div>
|
||||
</div>
|
||||
<div class="form-group {% if form.errors.email %}has-error{% endif %}">
|
||||
<label class="form-label" for="{{ form.email.id_for_label }}">Email</label>
|
||||
{{ form.email }}
|
||||
<div class="form-input-hint">{{ form.errors.email }}</div>
|
||||
</div>
|
||||
<div class="form-group {% if form.errors.password1 %}has-error{% endif %}">
|
||||
<label class="form-label" for="{{ form.password1.id_for_label }}">Password</label>
|
||||
{{ form.password1 }}
|
||||
<div class="form-input-hint">{{ form.errors.password1 }}</div>
|
||||
</div>
|
||||
<div class="form-group {% if form.errors.password2 %}has-error{% endif %}">
|
||||
<label class="form-label" for="{{ form.password2.id_for_label }}">Confirm Password</label>
|
||||
{{ form.password2 }}
|
||||
<div class="form-input-hint">{{ form.errors.password2 }}</div>
|
||||
</div>
|
||||
<br />
|
||||
<input type="submit" value="Register" class="btn btn-primary btn-wide">
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
</form>
|
||||
</main>
|
||||
{% endblock %}
|
||||
@@ -30,9 +30,6 @@
|
||||
href="{% url 'oidc_authentication_init' %}"
|
||||
data-turbo="false">Login with OIDC</a>
|
||||
{% endif %}
|
||||
{% if allow_registration %}
|
||||
<a href="{% url 'django_registration_register' %}" class="btn btn-link">Register</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
|
||||
@@ -158,18 +158,6 @@ if settings.LD_ENABLE_OIDC:
|
||||
# import debug_toolbar
|
||||
# urlpatterns.append(path("__debug__/", include(debug_toolbar.urls)))
|
||||
|
||||
# Registration
|
||||
if settings.ALLOW_REGISTRATION:
|
||||
from django_registration.backends.one_step.views import RegistrationView
|
||||
|
||||
urlpatterns.append(
|
||||
path(
|
||||
"accounts/register/",
|
||||
RegistrationView.as_view(),
|
||||
name="django_registration_register",
|
||||
)
|
||||
)
|
||||
|
||||
# Context path
|
||||
if settings.LD_CONTEXT_PATH:
|
||||
urlpatterns = [path(settings.LD_CONTEXT_PATH, include(urlpatterns))]
|
||||
|
||||
@@ -18,7 +18,6 @@ class LinkdingLoginView(auth_views.LoginView):
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
|
||||
context["allow_registration"] = settings.ALLOW_REGISTRATION
|
||||
context["enable_oidc"] = settings.LD_ENABLE_OIDC
|
||||
return context
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ dependencies = [
|
||||
"bleach>=6.3.0",
|
||||
"bleach-allowlist>=1.0.3",
|
||||
"django>=6.0",
|
||||
"django-registration>=5.2.1",
|
||||
"djangorestframework>=3.16.1",
|
||||
"huey>=2.5.5",
|
||||
"markdown>=3.10",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
variant="${1:-default}"
|
||||
|
||||
docker build -f "docker/$variant.Dockerfile" -t sissbruecker/linkding:local .
|
||||
docker build -f "docker/$variant.Dockerfile" --target linkding -t sissbruecker/linkding:local .
|
||||
|
||||
docker rm -f linkding-local || true
|
||||
|
||||
|
||||
24
uv.lock
generated
24
uv.lock
generated
@@ -161,15 +161,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "confusable-homoglyphs"
|
||||
version = "3.3.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/0d/10/1358fca1ee2d97d4f2877df9ffbe6d124da666fef3b2f75e771a4c1afee6/confusable_homoglyphs-3.3.1.tar.gz", hash = "sha256:b995001c9b2e1b4cea0cf5f3840a7c79188a8cbbad053d693572bd8c1c1ec460", size = 325480, upload-time = "2024-01-30T10:10:27.47Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/c5/6e/c0fcbb7d341a46cf4241a6aa9e6a737734f0657521fc1bcd074953fe4eea/confusable_homoglyphs-3.3.1-py2.py3-none-any.whl", hash = "sha256:84c92cb79dc7f55aa290d0762b2349abd8dee4c16fbe6f99eac978d394e2e6a1", size = 144755, upload-time = "2024-01-30T10:10:24.857Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "coverage"
|
||||
version = "7.13.1"
|
||||
@@ -328,19 +319,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/6d/72/685c978af45ad08257e2c69687a873eda6b6531c79b6e6091794c41c5ff6/django_debug_toolbar-6.1.0-py3-none-any.whl", hash = "sha256:e214dea4494087e7cebdcea84223819c5eb97f9de3110a3665ad673f0ba98413", size = 269069, upload-time = "2025-10-30T19:50:37.71Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "django-registration"
|
||||
version = "5.2.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "confusable-homoglyphs" },
|
||||
{ name = "django" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/9a/a0/f6e6d0a59b94eb4ab14983853334cb25401d677c5a3799aaca6819acf2eb/django_registration-5.2.1.tar.gz", hash = "sha256:06864f9da0bc4d7b073fb2da98d95d12428357ab0bc46e33f79c26707ec06bbe", size = 94187, upload-time = "2025-04-07T05:54:48.558Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/78/5d/aa2f82b3c809db66eb986963db1d4b89de190b4eac2e3021a725112e3b13/django_registration-5.2.1-py3-none-any.whl", hash = "sha256:7079e2364b15fc6bef18b81ae94c5e947b556abdbbfb19c9bcca14feafde6a3d", size = 105277, upload-time = "2025-04-07T05:54:46.981Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "djangorestframework"
|
||||
version = "3.16.1"
|
||||
@@ -484,7 +462,6 @@ dependencies = [
|
||||
{ name = "bleach" },
|
||||
{ name = "bleach-allowlist" },
|
||||
{ name = "django" },
|
||||
{ name = "django-registration" },
|
||||
{ name = "djangorestframework" },
|
||||
{ name = "huey" },
|
||||
{ name = "markdown" },
|
||||
@@ -517,7 +494,6 @@ requires-dist = [
|
||||
{ name = "bleach", specifier = ">=6.3.0" },
|
||||
{ name = "bleach-allowlist", specifier = ">=1.0.3" },
|
||||
{ name = "django", specifier = ">=6.0" },
|
||||
{ name = "django-registration", specifier = ">=5.2.1" },
|
||||
{ name = "djangorestframework", specifier = ">=3.16.1" },
|
||||
{ name = "huey", specifier = ">=2.5.5" },
|
||||
{ name = "markdown", specifier = ">=3.10" },
|
||||
|
||||
Reference in New Issue
Block a user