]> git.ipfire.org Git - ipfire.org.git/commitdiff
auth: Don't show password forgot/join link on subdomains
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Feb 2024 18:29:09 +0000 (18:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Feb 2024 18:29:09 +0000 (18:29 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/auth/login.html

index 0a79e43a5088723bfe55d8778d0af0388690e92a..5e660af6954119ba69a1c7a9c3fbeea6e1508e34 100644 (file)
                                                                        </div>
                                                                </div>
 
-                                                               <div class="field has-text-centered">
-                                                                       <a href="/password-reset{% if incorrect %}?username={{ username }}{% end %}">
-                                                                               {{ _("Did you forget your password?") }}
-                                                                       </a>
-                                                               </div>
+                                                               {% if request.host.startswith("www.") %}
+                                                                       <div class="field has-text-centered">
+                                                                               <a href="/password-reset{% if incorrect %}?username={{ username }}{% end %}">
+                                                                                       {{ _("Did you forget your password?") }}
+                                                                               </a>
+                                                                       </div>
+                                                               {% end %}
                                                        </form>
                                                </div>
 
-                                               <div class="block has-text-centered">
-                                                       <a href="/join">
-                                                               {{ _("Don't have an account, yet? Join Now") }}
-                                                       </a>
-                                               </div>
+                                               {% if request.host.startswith("www.") %}
+                                                       <div class="block has-text-centered">
+                                                               <a href="/join">
+                                                                       {{ _("Don't have an account, yet? Join Now") }}
+                                                               </a>
+                                                       </div>
+                                               {% end %}
                                        </div>
                                </div>
                        </div>