Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Check workspace count to detect if user has no workspaces (lib), #2248,
Browse files Browse the repository at this point in the history
closes #2390
  • Loading branch information
IndrekV committed Feb 9, 2018
1 parent c92d99f commit f849429
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/user.cc
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ error User::LoadUserAndRelatedDataFromJSONString(
// Handle missing workspace issue.
// If default wid is missing there are no workspaces

if (!root["data"].isMember("default_wid")) {
if (!root["data"].isMember("workspaces") || root["data"]["workspaces"].size() == 0) {
return error("You no longer have access to your last workspace"); // NOLINT
}

Expand Down

0 comments on commit f849429

Please sign in to comment.