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

moved user.active to account.active

This commit is contained in:
Harvey Kandola 2017-02-21 11:59:04 -08:00
parent af80b39cd0
commit 5f2f9d5ae5
4 changed files with 21 additions and 17 deletions

View file

@ -441,6 +441,7 @@ func UpdateUser(w http.ResponseWriter, r *http.Request) {
account.Editor = user.Editor
account.Admin = user.Admin
account.Active = user.Active
err = p.UpdateAccount(account)
if err != nil {
@ -690,11 +691,13 @@ func attachUserAccounts(p request.Persister, orgID string, user *entity.User) {
user.Accounts = a
user.Editor = false
user.Admin = false
user.Active = false
for _, account := range user.Accounts {
if account.OrgID == orgID {
user.Admin = account.Admin
user.Editor = account.Editor
user.Active = account.Active
break
}
}