about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2021-01-21 06:18:30 +0100
committerGitHub <noreply@github.com>2021-01-21 06:18:30 +0100
commite955ca5463dc399694455bc25301d56499a1b6ef (patch)
treea95ce7cbf950d7536a2fda8ef67d6a7da167e612 /app
parentd8d75cd6c285f92863d150ed7176cad03264dd9c (diff)
Fix sign-up restrictions based on IP addresses not being enforced (#15607)
Fixes #15606

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index f8c8a6ab5..b4508c2eb 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -152,7 +152,7 @@ class User < ApplicationRecord
 
   def confirm
     new_user      = !confirmed?
-    self.approved = true if open_registrations?
+    self.approved = true if open_registrations? && !sign_up_from_ip_requires_approval?
 
     super