fix: remove isGlobalAdmin field in user (#2235)

* refactor: remove isGlobalAdmin field in user

* fix: upload xlsx

* fix: remove field in account table
This commit is contained in:
Yaodong Yu
2023-08-19 12:23:15 +08:00
committed by GitHub
parent a07216d0e1
commit e5a189e0f4
28 changed files with 212 additions and 763 deletions

View File

@ -310,10 +310,7 @@ func CheckPermissionForUpdateUser(oldUser, newUser *User, isAdmin bool, lang str
item := GetAccountItemByName("Is admin", organization)
itemsChanged = append(itemsChanged, item)
}
if oldUser.IsGlobalAdmin != newUser.IsGlobalAdmin {
item := GetAccountItemByName("Is global admin", organization)
itemsChanged = append(itemsChanged, item)
}
if oldUser.IsForbidden != newUser.IsForbidden {
item := GetAccountItemByName("Is forbidden", organization)
itemsChanged = append(itemsChanged, item)
@ -351,5 +348,5 @@ func (user *User) IsAdminUser() bool {
return false
}
return user.IsAdmin || user.IsGlobalAdmin
return user.IsAdmin || user.IsGlobalAdmin()
}