(core) Avoid flagging support user as collaborator

Summary:
When initially added in the User Manager, the support user
(e.g. support@getgrist.com) was misleadingly being annotated as
a free collaborator. This fixes the annotation to be "Grist support"
instead.

Test Plan: Browser test.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3730
This commit is contained in:
George Gevoian
2022-12-12 20:06:15 -05:00
parent 629fcccd5a
commit c558800de5
4 changed files with 23 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ import {ShareAnnotations, ShareAnnotator} from 'app/common/ShareAnnotator';
import {normalizeEmail} from 'app/common/emails';
import {GristLoadConfig} from 'app/common/gristUrls';
import * as roles from 'app/common/roles';
import {getGristConfig} from 'app/common/urlUtils';
import {ANONYMOUS_USER_EMAIL, Document, EVERYONE_EMAIL, FullUser, getRealAccess, Organization,
PermissionData, PermissionDelta, UserAPI, Workspace} from 'app/common/UserAPI';
import {computed, Computed, Disposable, obsArray, ObsArray, observable, Observable} from 'grainjs';
@@ -179,7 +180,8 @@ export class UserManagerModelImpl extends Disposable implements UserManagerModel
super();
if (this._options.appModel) {
const product = this._options.appModel.currentProduct;
this._shareAnnotator = new ShareAnnotator(product, initData);
const {supportEmail} = getGristConfig();
this._shareAnnotator = new ShareAnnotator(product, initData, {supportEmail});
}
this.annotate();
}