Fix sign-up restrictions based on IP addresses not being enforced (#15607)

Fixes #15606

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
ThibG 2021-01-21 06:18:30 +01:00 committed by Claire
parent 4bd8dc09d8
commit 4b025cf7e6

View file

@ -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