fix(editor): Remove isOwner from IUser interface (#8888)
This commit is contained in:
@@ -59,6 +59,7 @@ import {
|
||||
BAMBOO_HR_NODE_TYPE,
|
||||
GOOGLE_SHEETS_NODE_TYPE,
|
||||
CODE_NODE_TYPE,
|
||||
ROLE,
|
||||
} from '@/constants';
|
||||
import type {
|
||||
IPersonalizationSurveyAnswersV1,
|
||||
@@ -83,18 +84,13 @@ function isPersonalizationSurveyV2OrLater(
|
||||
return 'version' in data;
|
||||
}
|
||||
|
||||
export const ROLE = {
|
||||
Owner: 'global:owner',
|
||||
Member: 'global:member',
|
||||
Admin: 'global:admin',
|
||||
Default: 'default', // default user with no email when setting up instance
|
||||
} as const;
|
||||
|
||||
export const LOGIN_STATUS: { LoggedIn: ILogInStatus; LoggedOut: ILogInStatus } = {
|
||||
LoggedIn: 'LoggedIn', // Can be owner or member or default user
|
||||
LoggedOut: 'LoggedOut', // Can only be logged out if UM has been setup
|
||||
};
|
||||
|
||||
export const isUserGlobalOwner = (user: IUser): boolean => user.role === ROLE.Owner;
|
||||
|
||||
export function getPersonalizedNodeTypes(
|
||||
answers:
|
||||
| IPersonalizationSurveyAnswersV1
|
||||
|
||||
Reference in New Issue
Block a user