🛠️ Shared with me feature flag (#681)
🛠️ Shared with me feature flag (#681)
This commit is contained in:
@@ -54,10 +54,6 @@ export function formatCompany(
|
||||
[CompanyFeaturesEnum.CHAT_EDIT_FILES]: true,
|
||||
[CompanyFeaturesEnum.CHAT_UNLIMITED_STORAGE]: true,
|
||||
[CompanyFeaturesEnum.COMPANY_INVITE_MEMBER]: true,
|
||||
// use the config value for this one
|
||||
[CompanyFeaturesEnum.COMPANY_SEARCH_USERS]: JSON.parse(
|
||||
config.get("drive.featureSearchUsers") || "true",
|
||||
),
|
||||
[CompanyFeaturesEnum.COMPANY_SHARED_DRIVE]: JSON.parse(
|
||||
config.get("drive.featureSharedDrive") || "true",
|
||||
),
|
||||
@@ -67,6 +63,9 @@ export function formatCompany(
|
||||
[CompanyFeaturesEnum.COMPANY_USER_QUOTA]: JSON.parse(
|
||||
config.get("drive.featureUserQuota") || "false",
|
||||
),
|
||||
[CompanyFeaturesEnum.COMPANY_MANAGE_ACCESS]: JSON.parse(
|
||||
config.get("drive.featureManageAccess") || "true",
|
||||
),
|
||||
},
|
||||
{
|
||||
...(res.plan?.features || {}),
|
||||
@@ -76,8 +75,6 @@ export function formatCompany(
|
||||
},
|
||||
);
|
||||
|
||||
console.log("🚀🚀 res.plan.features: ", res.plan.features);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,10 +91,10 @@ export const companyObjectSchema = {
|
||||
[CompanyFeaturesEnum.CHAT_MULTIPLE_WORKSPACES]: { type: "boolean" },
|
||||
[CompanyFeaturesEnum.CHAT_UNLIMITED_STORAGE]: { type: "boolean" },
|
||||
[CompanyFeaturesEnum.COMPANY_INVITE_MEMBER]: { type: "boolean" },
|
||||
[CompanyFeaturesEnum.COMPANY_SEARCH_USERS]: { type: "boolean" },
|
||||
[CompanyFeaturesEnum.COMPANY_SHARED_DRIVE]: { type: "boolean" },
|
||||
[CompanyFeaturesEnum.COMPANY_DISPLAY_EMAIL]: { type: "boolean" },
|
||||
[CompanyFeaturesEnum.COMPANY_USER_QUOTA]: { type: "boolean" },
|
||||
[CompanyFeaturesEnum.COMPANY_MANAGE_ACCESS]: { type: "boolean" },
|
||||
guests: { type: "number" }, // to rename or delete
|
||||
members: { type: "number" }, // to rename or delete
|
||||
storage: { type: "number" }, // to rename or delete
|
||||
|
||||
@@ -83,10 +83,10 @@ export enum CompanyFeaturesEnum {
|
||||
CHAT_EDIT_FILES = "chat:edit_files",
|
||||
CHAT_UNLIMITED_STORAGE = "chat:unlimited_storage",
|
||||
COMPANY_INVITE_MEMBER = "company:invite_member",
|
||||
COMPANY_SEARCH_USERS = "company:search_users",
|
||||
COMPANY_SHARED_DRIVE = "company:shared_drive",
|
||||
COMPANY_DISPLAY_EMAIL = "company:display_email",
|
||||
COMPANY_USER_QUOTA = "company:user_quota",
|
||||
COMPANY_MANAGE_ACCESS = "company:managed_access",
|
||||
}
|
||||
|
||||
export type CompanyFeaturesObject = {
|
||||
@@ -96,10 +96,10 @@ export type CompanyFeaturesObject = {
|
||||
[CompanyFeaturesEnum.CHAT_EDIT_FILES]?: boolean;
|
||||
[CompanyFeaturesEnum.CHAT_UNLIMITED_STORAGE]?: boolean;
|
||||
[CompanyFeaturesEnum.COMPANY_INVITE_MEMBER]?: boolean;
|
||||
[CompanyFeaturesEnum.COMPANY_SEARCH_USERS]?: boolean;
|
||||
[CompanyFeaturesEnum.COMPANY_SHARED_DRIVE]?: boolean;
|
||||
[CompanyFeaturesEnum.COMPANY_DISPLAY_EMAIL]?: boolean;
|
||||
[CompanyFeaturesEnum.COMPANY_USER_QUOTA]?: boolean;
|
||||
[CompanyFeaturesEnum.COMPANY_MANAGE_ACCESS]?: boolean;
|
||||
};
|
||||
|
||||
export type CompanyLimitsObject = {
|
||||
|
||||
Reference in New Issue
Block a user