1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 13:19:43 +02:00

user.active removed from login

This commit is contained in:
Harvey Kandola 2017-02-22 07:12:22 -08:00
parent 1df103e9a8
commit b0d70e2657
2 changed files with 592 additions and 590 deletions

View file

@ -84,7 +84,7 @@ func Authenticate(w http.ResponseWriter, r *http.Request) {
return
}
if !user.Active || len(user.Reset) > 0 || len(user.Password) == 0 {
if len(user.Reset) > 0 || len(user.Password) == 0 {
writeUnauthorizedError(w)
return
}
@ -105,6 +105,8 @@ func Authenticate(w http.ResponseWriter, r *http.Request) {
// Attach user accounts and work out permissions
attachUserAccounts(p, org.RefID, &user)
// active check
if len(user.Accounts) == 0 {
writeUnauthorizedError(w)
return