From 724c1c1228aa601fdbbed93dde68a5a9fa9c5ae9 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 20 Jul 2022 09:12:11 -0400
Subject: added a 'guest' login mode.  added ability for mainView to be any
 doc, not just a docking collection.

---
 src/client/util/GroupManager.tsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'src/client/util/GroupManager.tsx')

diff --git a/src/client/util/GroupManager.tsx b/src/client/util/GroupManager.tsx
index 59334f6a2..c8b784390 100644
--- a/src/client/util/GroupManager.tsx
+++ b/src/client/util/GroupManager.tsx
@@ -14,6 +14,7 @@ import { GroupMemberView } from './GroupMemberView';
 import { SharingManager, User } from './SharingManager';
 import { listSpec } from '../../fields/Schema';
 import { DateField } from '../../fields/DateField';
+import { Id } from '../../fields/FieldSymbols';
 
 /**
  * Interface for options for the react-select component
@@ -49,9 +50,11 @@ export class GroupManager extends React.Component<{}> {
      * Fetches the list of users stored on the database.
      */
     populateUsers = async () => {
-        const userList = await RequestPromise.get(Utils.prepend('/getUsers'));
-        const raw = JSON.parse(userList) as User[];
-        raw.map(action(user => !this.users.some(umail => umail === user.email) && this.users.push(user.email)));
+        if (Doc.UserDoc()[Id] !== '__guest__') {
+            const userList = await RequestPromise.get(Utils.prepend('/getUsers'));
+            const raw = JSON.parse(userList) as User[];
+            raw.map(action(user => !this.users.some(umail => umail === user.email) && this.users.push(user.email)));
+        }
     };
 
     /**
-- 
cgit v1.2.3-70-g09d2

