mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Support "Public access" switch in the UI for docs.
Summary: - The older "Anonymous access" option is renamed to "Public access" in the UI. - This option was only present with GRIST_SUPPORT_ANON set. - With GRIST_SUPPORT_ANON, the old behavior is kept: "Public access" option adds/removes anon@ user - Without GRIST_SUPPORT_ANON (normal case), orgs/workspaces don't support "Public access" option. For documents, it adds/removes everyone@ user. The latter is the main feature of interest. The GRIST_SUPPORT_ANON flag is set for on-premise installs, and adds discoverability by anon users. Test Plan: Added a test cases and checks in other tests. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2612
This commit is contained in:
parent
87f2fd15fb
commit
986f469965
@ -15,6 +15,9 @@ import {addCurrentOrgToPath} from 'app/common/urlUtils';
|
||||
// Nominal email address of the anonymous user.
|
||||
export const ANONYMOUS_USER_EMAIL = 'anon@getgrist.com';
|
||||
|
||||
// Nominal email address of a user who, if you share with them, everyone gets access.
|
||||
export const EVERYONE_EMAIL = 'everyone@getgrist.com';
|
||||
|
||||
// A special user allowed to add/remove the EVERYONE_EMAIL to/from a resource.
|
||||
export const SUPPORT_EMAIL = 'support@getgrist.com';
|
||||
|
||||
|
@ -7,7 +7,8 @@ import {FullUser, UserProfile} from 'app/common/LoginSessionAPI';
|
||||
import {checkSubdomainValidity} from 'app/common/orgNameUtils';
|
||||
import * as roles from 'app/common/roles';
|
||||
// TODO: API should implement UserAPI
|
||||
import {ANONYMOUS_USER_EMAIL, DocumentProperties, ManagerDelta, NEW_DOCUMENT_CODE, Organization as OrgInfo,
|
||||
import {ANONYMOUS_USER_EMAIL, DocumentProperties, EVERYONE_EMAIL,
|
||||
ManagerDelta, NEW_DOCUMENT_CODE, Organization as OrgInfo,
|
||||
OrganizationProperties, PermissionData, PermissionDelta, SUPPORT_EMAIL, UserAccessData,
|
||||
WorkspaceProperties} from "app/common/UserAPI";
|
||||
import {AclRule, AclRuleDoc, AclRuleOrg, AclRuleWs} from "app/gen-server/entity/AclRule";
|
||||
@ -44,9 +45,6 @@ applyPatch();
|
||||
// Nominal email address of a user who can view anything (for thumbnails).
|
||||
export const PREVIEWER_EMAIL = 'thumbnail@getgrist.com';
|
||||
|
||||
// Nominal email address of a user who, if you share with them, everyone gets access.
|
||||
export const EVERYONE_EMAIL = 'everyone@getgrist.com';
|
||||
|
||||
// A list of emails we don't expect to see logins for.
|
||||
const NON_LOGIN_EMAILS = [PREVIEWER_EMAIL, EVERYONE_EMAIL, ANONYMOUS_USER_EMAIL];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user