tenantSites = new XOSTenantSiteCollection();\r
tenantSites.getFromSlice(model);\r
model.usersBuffer = model.attributes.users; /* save a copy of 'users' that we can edit. This prevents another view (developer) from overwriting our copy with a fetch from the server */\r
+ model.usersOrig = model.attributes.users; /* save an immutable copy that we'll use for username lookups */\r
+ model.user_namesOrig = model.attributes.user_names;\r
model.tenantSiteCollection = tenantSites;\r
XOSTenantApp.tenantSites = tenantSites;\r
\r
if (xos.tenant().blessed_sites.length == 0) {\r
errors.push("no blessed sites");\r
}\r
+ if (xos.tenant().current_user_site_id == null) {\r
+ errors.push("current user does not have a site");\r
+ }\r
\r
if (errors.length > 0) {\r
$("#tenantSummary").html("Tenant view sanity check failed<br>" + errors.join("<br>"));\r