mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) make the support account configurable, and allow listing public sites
Summary: This makes two small tweaks based on a user's questions about sharing sites publicly for a self-managed installation: * The support user `support@getgrist.com` is made configurable with `GRIST_SUPPORT_EMAIL`. This came up because only the support user can share material with the special "everyone" user. This restriction was added to avoid spam. * Regardless of public sharing settings, for our SaaS we had decided not to list public sites to anonymous users. That is somewhat a question of taste, so a `GRIST_LIST_PUBLIC_SITES` flag is added to override this choice. Public sharing isn't in a well polished state, and this diff doesn't advance that, in fact it adds a new wrinkle :-/ Test Plan: existing tests pass; manual testing Reviewers: jarek Reviewed By: jarek Subscribers: jarek Differential Revision: https://phab.getgrist.com/D3663
This commit is contained in:
@@ -55,11 +55,11 @@ export class ShareAnnotator {
|
||||
}
|
||||
const top = features.maxSharesPerDoc;
|
||||
let at = 0;
|
||||
const makeAnnotation = (user: {email: string, isMember?: boolean, access: string|null}) => {
|
||||
const makeAnnotation = (user: {email: string, isMember?: boolean, isSupport?: boolean, access: string|null}) => {
|
||||
const annotation: ShareAnnotation = {
|
||||
isMember: user.isMember,
|
||||
};
|
||||
if (user.email === 'support@getgrist.com') {
|
||||
if (user.isSupport) {
|
||||
return { isSupport: true };
|
||||
}
|
||||
if (!annotation.isMember && user.access) {
|
||||
|
||||
Reference in New Issue
Block a user