1
0
Fork 0
forked from External/ergo

Merge remote-tracking branch 'origin/master' into compat.4

This commit is contained in:
Shivaram Lingamneni 2019-05-11 21:56:41 -04:00
commit 5331afbdd4
17 changed files with 527 additions and 236 deletions

View file

@ -237,7 +237,10 @@ func (am *AccountManager) BouncerAllowed(account string, session *Session) bool
if !config.Accounts.Bouncer.Enabled {
return false
}
return config.Accounts.Bouncer.AllowedByDefault || session.capabilities.Has(caps.Bouncer)
if config.Accounts.Bouncer.AllowedByDefault {
return true
}
return session != nil && session.capabilities.Has(caps.Bouncer)
}
// Looks up the enforcement method stored in the database for an account