(core) make treatment of emails consistent across /access endpoints

Summary:
Access endpoints were supposed to provide display versions of emails,
but in fact only the org endpoint was doing so.  This brings the
workspaces and docs endpoints into line, and adds tests.

Full user information is tweaked slightly to return an anonymous
flag only when anonymous.  This was already anticipated in the
FullUser type.

Test Plan: extended test

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D2999
This commit is contained in:
Paul Fitzpatrick
2021-08-26 18:03:41 -04:00
parent a6e08883e0
commit 8b1ad588e9
2 changed files with 10 additions and 15 deletions

View File

@@ -167,6 +167,7 @@ export interface UserAccessData {
// access to the resource. Lack of access to the parent resource is represented by a null value.
// If parent has non-inheritable access, this should be null.
parentAccess?: roles.BasicRole|null;
anonymous?: boolean; // If set to true, the user is the anonymous user.
}
/**