Merge remote-tracking branch 'tootsuite/master' into merge-upstream
Conflicts: app/javascript/styles/mastodon/components.scss
This commit is contained in:
@@ -8,7 +8,13 @@ class UnreservedUsernameValidator < ActiveModel::Validator
|
||||
|
||||
private
|
||||
|
||||
def pam_controlled?(value)
|
||||
return false unless Devise.pam_authentication && Devise.pam_controlled_service
|
||||
Rpam2.account(Devise.pam_controlled_service, value).present?
|
||||
end
|
||||
|
||||
def reserved_username?(value)
|
||||
return true if pam_controlled?(value)
|
||||
return false unless Setting.reserved_usernames
|
||||
Setting.reserved_usernames.include?(value.downcase)
|
||||
end
|
||||
|
Reference in New Issue
Block a user