✨ "Shared Drive" can be disabled in configuration (#335)
This commit is contained in:
@@ -133,6 +133,7 @@
|
|||||||
"server": "PLUGINS_SERVER"
|
"server": "PLUGINS_SERVER"
|
||||||
},
|
},
|
||||||
"drive": {
|
"drive": {
|
||||||
|
"featureSharedDrive": "ENABLE_FEATURE_SHARED_DRIVE",
|
||||||
"rootAdmins": "DRIVE_ROOT_ADMINS",
|
"rootAdmins": "DRIVE_ROOT_ADMINS",
|
||||||
"defaultLanguage": "DRIVE_DEFAULT_LANGUAGE",
|
"defaultLanguage": "DRIVE_DEFAULT_LANGUAGE",
|
||||||
"featureSearchUsers": "ENABLE_FEATURE_SEARCH_USERS"
|
"featureSearchUsers": "ENABLE_FEATURE_SEARCH_USERS"
|
||||||
|
|||||||
@@ -135,6 +135,7 @@
|
|||||||
"debug": true
|
"debug": true
|
||||||
},
|
},
|
||||||
"drive": {
|
"drive": {
|
||||||
|
"featureSharedDrive": true,
|
||||||
"featureSearchUsers": true
|
"featureSearchUsers": true
|
||||||
},
|
},
|
||||||
"applications": {
|
"applications": {
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ export function formatCompany(
|
|||||||
[CompanyFeaturesEnum.COMPANY_SEARCH_USERS]: JSON.parse(
|
[CompanyFeaturesEnum.COMPANY_SEARCH_USERS]: JSON.parse(
|
||||||
config.get("drive.featureSearchUsers") || "true",
|
config.get("drive.featureSearchUsers") || "true",
|
||||||
),
|
),
|
||||||
|
[CompanyFeaturesEnum.COMPANY_SHARED_DRIVE]: JSON.parse(
|
||||||
|
config.get("drive.featureSharedDrive") || "true",
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...(res.plan?.features || {}),
|
...(res.plan?.features || {}),
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ export const companyObjectSchema = {
|
|||||||
[CompanyFeaturesEnum.CHAT_UNLIMITED_STORAGE]: { type: "boolean" },
|
[CompanyFeaturesEnum.CHAT_UNLIMITED_STORAGE]: { type: "boolean" },
|
||||||
[CompanyFeaturesEnum.COMPANY_INVITE_MEMBER]: { type: "boolean" },
|
[CompanyFeaturesEnum.COMPANY_INVITE_MEMBER]: { type: "boolean" },
|
||||||
[CompanyFeaturesEnum.COMPANY_SEARCH_USERS]: { type: "boolean" },
|
[CompanyFeaturesEnum.COMPANY_SEARCH_USERS]: { type: "boolean" },
|
||||||
|
[CompanyFeaturesEnum.COMPANY_SHARED_DRIVE]: { type: "boolean" },
|
||||||
guests: { type: "number" }, // to rename or delete
|
guests: { type: "number" }, // to rename or delete
|
||||||
members: { type: "number" }, // to rename or delete
|
members: { type: "number" }, // to rename or delete
|
||||||
storage: { type: "number" }, // to rename or delete
|
storage: { type: "number" }, // to rename or delete
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ export enum CompanyFeaturesEnum {
|
|||||||
CHAT_UNLIMITED_STORAGE = "chat:unlimited_storage",
|
CHAT_UNLIMITED_STORAGE = "chat:unlimited_storage",
|
||||||
COMPANY_INVITE_MEMBER = "company:invite_member",
|
COMPANY_INVITE_MEMBER = "company:invite_member",
|
||||||
COMPANY_SEARCH_USERS = "company:search_users",
|
COMPANY_SEARCH_USERS = "company:search_users",
|
||||||
|
COMPANY_SHARED_DRIVE = "company:shared_drive",
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CompanyFeaturesObject = {
|
export type CompanyFeaturesObject = {
|
||||||
@@ -94,6 +95,7 @@ export type CompanyFeaturesObject = {
|
|||||||
[CompanyFeaturesEnum.CHAT_UNLIMITED_STORAGE]?: boolean;
|
[CompanyFeaturesEnum.CHAT_UNLIMITED_STORAGE]?: boolean;
|
||||||
[CompanyFeaturesEnum.COMPANY_INVITE_MEMBER]?: boolean;
|
[CompanyFeaturesEnum.COMPANY_INVITE_MEMBER]?: boolean;
|
||||||
[CompanyFeaturesEnum.COMPANY_SEARCH_USERS]?: boolean;
|
[CompanyFeaturesEnum.COMPANY_SEARCH_USERS]?: boolean;
|
||||||
|
[CompanyFeaturesEnum.COMPANY_SHARED_DRIVE]?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type CompanyLimitsObject = {
|
export type CompanyLimitsObject = {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export enum FeatureNames {
|
|||||||
UNLIMITED_STORAGE = 'chat:unlimited_storage', //Currently inactive
|
UNLIMITED_STORAGE = 'chat:unlimited_storage', //Currently inactive
|
||||||
COMPANY_INVITE_MEMBER = 'company:invite_member',
|
COMPANY_INVITE_MEMBER = 'company:invite_member',
|
||||||
COMPANY_SEARCH_USERS = 'company:search_users',
|
COMPANY_SEARCH_USERS = 'company:search_users',
|
||||||
|
COMPANY_SHARED_DRIVE = 'company:shared_drive',
|
||||||
}
|
}
|
||||||
|
|
||||||
export type FeatureValueType = boolean | number;
|
export type FeatureValueType = boolean | number;
|
||||||
@@ -23,7 +24,9 @@ availableFeaturesWithDefaults.set(FeatureNames.MULTIPLE_WORKSPACES, true);
|
|||||||
availableFeaturesWithDefaults.set(FeatureNames.EDIT_FILES, true);
|
availableFeaturesWithDefaults.set(FeatureNames.EDIT_FILES, true);
|
||||||
availableFeaturesWithDefaults.set(FeatureNames.UNLIMITED_STORAGE, true);
|
availableFeaturesWithDefaults.set(FeatureNames.UNLIMITED_STORAGE, true);
|
||||||
availableFeaturesWithDefaults.set(FeatureNames.COMPANY_INVITE_MEMBER, true);
|
availableFeaturesWithDefaults.set(FeatureNames.COMPANY_INVITE_MEMBER, true);
|
||||||
|
availableFeaturesWithDefaults.set(FeatureNames.COMPANY_INVITE_MEMBER, true);
|
||||||
availableFeaturesWithDefaults.set(FeatureNames.COMPANY_SEARCH_USERS, true);
|
availableFeaturesWithDefaults.set(FeatureNames.COMPANY_SEARCH_USERS, true);
|
||||||
|
availableFeaturesWithDefaults.set(FeatureNames.COMPANY_SHARED_DRIVE, true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ChannelServiceImpl that allow you to manage feature flipping in Tdrive using react feature toggles
|
* ChannelServiceImpl that allow you to manage feature flipping in Tdrive using react feature toggles
|
||||||
|
|||||||
@@ -89,26 +89,29 @@ export default () => {
|
|||||||
>
|
>
|
||||||
<UserIcon className="w-5 h-5 mr-4" /> {Languages.t('components.side_menu.my_drive')}
|
<UserIcon className="w-5 h-5 mr-4" /> {Languages.t('components.side_menu.my_drive')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
{FeatureTogglesService.isActiveFeatureName(FeatureNames.COMPANY_SHARED_DRIVE) && (
|
||||||
onClick={() => {
|
<Button
|
||||||
history.push(
|
onClick={() => {
|
||||||
RouterServices.generateRouteFromState({
|
history.push(
|
||||||
companyId: company,
|
RouterServices.generateRouteFromState({
|
||||||
viewId: 'root',
|
companyId: company,
|
||||||
itemId: '',
|
viewId: 'root',
|
||||||
dirId: '',
|
itemId: '',
|
||||||
}),
|
dirId: '',
|
||||||
);
|
}),
|
||||||
setParentId('root');
|
);
|
||||||
}}
|
setParentId('root');
|
||||||
size="lg"
|
}}
|
||||||
theme="white"
|
size="lg"
|
||||||
className={
|
theme="white"
|
||||||
'w-full mb-1 ' + (folderType === 'home' && viewId == 'root' ? activeClass : '')
|
className={
|
||||||
}
|
'w-full mb-1 ' + (folderType === 'home' && viewId == 'root' ? activeClass : '')
|
||||||
>
|
}
|
||||||
<CloudIcon className="w-5 h-5 mr-4" /> {Languages.t('components.side_menu.home')}
|
>
|
||||||
</Button>
|
|
||||||
|
<CloudIcon className="w-5 h-5 mr-4" /> {Languages.t('components.side_menu.home')}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
{FeatureTogglesService.isActiveFeatureName(FeatureNames.COMPANY_SEARCH_USERS) && (
|
{FeatureTogglesService.isActiveFeatureName(FeatureNames.COMPANY_SEARCH_USERS) && (
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user