mirror of
https://github.com/documize/community.git
synced 2025-07-20 05:39:42 +02:00
user.active removed from login
This commit is contained in:
parent
1df103e9a8
commit
b0d70e2657
2 changed files with 592 additions and 590 deletions
|
@ -84,7 +84,7 @@ func Authenticate(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !user.Active || len(user.Reset) > 0 || len(user.Password) == 0 {
|
if len(user.Reset) > 0 || len(user.Password) == 0 {
|
||||||
writeUnauthorizedError(w)
|
writeUnauthorizedError(w)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,8 @@ func Authenticate(w http.ResponseWriter, r *http.Request) {
|
||||||
// Attach user accounts and work out permissions
|
// Attach user accounts and work out permissions
|
||||||
attachUserAccounts(p, org.RefID, &user)
|
attachUserAccounts(p, org.RefID, &user)
|
||||||
|
|
||||||
|
// active check
|
||||||
|
|
||||||
if len(user.Accounts) == 0 {
|
if len(user.Accounts) == 0 {
|
||||||
writeUnauthorizedError(w)
|
writeUnauthorizedError(w)
|
||||||
return
|
return
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue