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

user/account store loading

This commit is contained in:
Harvey Kandola 2017-10-03 17:52:03 -04:00
parent 620fe28b27
commit f5f30d2322
27 changed files with 238 additions and 221 deletions

View file

@ -278,7 +278,6 @@ func (h *Handler) GetSpaceUsers(w http.ResponseWriter, r *http.Request) {
}
// Get user account as we need to know if user can see all users.
// account.users == false means we restrict viewing to just space users
account, err := h.Store.Account.GetUserAccount(ctx, ctx.UserID)
if err != nil && err != sql.ErrNoRows {
response.WriteJSON(w, u)
@ -286,6 +285,7 @@ func (h *Handler) GetSpaceUsers(w http.ResponseWriter, r *http.Request) {
return
}
// account.users == false means we restrict viewing to just space users
if account.Users {
// can see all users
u, err = h.Store.User.GetActiveUsersForOrganization(ctx)