forked from External/ergo
make SAREGISTER override DEFCON
DEFCON 4 and lower were blocking SAREGISTER. This is wrong; admins should be allowed to make new accounts even under DEFCON (this may be needed specifically to work around the DEFCON restriction).
This commit is contained in:
parent
4010f3fc02
commit
9f6e26450b
1 changed files with 1 additions and 1 deletions
|
|
@ -356,7 +356,7 @@ func (am *AccountManager) Register(client *Client, account string, callbackNames
|
||||||
config := am.server.Config()
|
config := am.server.Config()
|
||||||
|
|
||||||
// final "is registration allowed" check:
|
// final "is registration allowed" check:
|
||||||
if !(config.Accounts.Registration.Enabled || callbackNamespace == "admin") || am.server.Defcon() <= 4 {
|
if callbackNamespace != "admin" && (!config.Accounts.Registration.Enabled || am.server.Defcon() <= 4) {
|
||||||
return errFeatureDisabled
|
return errFeatureDisabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue