Toggle display of the user email in the header (#336)

This commit is contained in:
Anton Shepilov
2024-01-22 17:01:50 +03:00
committed by GitHub
parent e887d820e5
commit 18ca9444ca
7 changed files with 28 additions and 8 deletions
@@ -61,6 +61,9 @@ export function formatCompany(
[CompanyFeaturesEnum.COMPANY_SHARED_DRIVE]: JSON.parse(
config.get("drive.featureSharedDrive") || "true",
),
[CompanyFeaturesEnum.COMPANY_DISPLAY_EMAIL]: JSON.parse(
config.get("drive.featureDisplayEmail") || "true",
),
},
{
...(res.plan?.features || {}),
@@ -94,6 +94,7 @@ export const companyObjectSchema = {
[CompanyFeaturesEnum.COMPANY_INVITE_MEMBER]: { type: "boolean" },
[CompanyFeaturesEnum.COMPANY_SEARCH_USERS]: { type: "boolean" },
[CompanyFeaturesEnum.COMPANY_SHARED_DRIVE]: { type: "boolean" },
[CompanyFeaturesEnum.COMPANY_DISPLAY_EMAIL]: { type: "boolean" },
guests: { type: "number" }, // to rename or delete
members: { type: "number" }, // to rename or delete
storage: { type: "number" }, // to rename or delete
@@ -85,6 +85,7 @@ export enum CompanyFeaturesEnum {
COMPANY_INVITE_MEMBER = "company:invite_member",
COMPANY_SEARCH_USERS = "company:search_users",
COMPANY_SHARED_DRIVE = "company:shared_drive",
COMPANY_DISPLAY_EMAIL = "company:display_email",
}
export type CompanyFeaturesObject = {
@@ -96,6 +97,7 @@ export type CompanyFeaturesObject = {
[CompanyFeaturesEnum.COMPANY_INVITE_MEMBER]?: boolean;
[CompanyFeaturesEnum.COMPANY_SEARCH_USERS]?: boolean;
[CompanyFeaturesEnum.COMPANY_SHARED_DRIVE]?: boolean;
[CompanyFeaturesEnum.COMPANY_DISPLAY_EMAIL]?: boolean;
};
export type CompanyLimitsObject = {