diff --git a/frontend/src/components/dialog/add-wiki-dialog.js b/frontend/src/components/dialog/add-wiki-dialog.js index 6a9295f89d5..3545301ab80 100644 --- a/frontend/src/components/dialog/add-wiki-dialog.js +++ b/frontend/src/components/dialog/add-wiki-dialog.js @@ -7,8 +7,6 @@ import { Utils } from '../../utils/utils'; import toaster from '../toast'; import { SeahubSelect } from '../common/select'; -const { multiTenancy, cloudMode } = window.app.pageOptions; - const propTypes = { toggleCancel: PropTypes.func.isRequired, addWiki: PropTypes.func.isRequired, @@ -25,11 +23,10 @@ class AddWikiDialog extends React.Component { selectedOption: null, options: [], }; - this.isDepartment = isPro && multiTenancy && cloudMode; } componentDidMount() { - if (!this.isDepartment) return; + if (!isPro) return; wikiAPI.listWikiDepartments().then(res => { const departments = res.data.sort((a, b) => { return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1; @@ -88,7 +85,7 @@ class AddWikiDialog extends React.Component { - {this.isDepartment && + {isPro && <> { res.data.forEach(item => departmentMap[item.id] = true); diff --git a/seahub/templates/base_for_react.html b/seahub/templates/base_for_react.html index d99b13c1412..287a7cefbe7 100644 --- a/seahub/templates/base_for_react.html +++ b/seahub/templates/base_for_react.html @@ -67,8 +67,6 @@ canAddRepo: {% if user.permissions.can_add_repo %} true {% else %} false {% endif %}, canShareRepo: {% if user.permissions.can_share_repo %} true {% else %} false {% endif %}, canAddGroup: {% if user.permissions.can_add_group %} true {% else %} false {% endif %}, - multiTenancy: {% if multi_tenancy %} true {% else %} false {% endif %}, - cloudMode: {% if cloud_mode %} true {% else %} false {% endif %}, groupImportMembersExtraMsg: "{{group_import_members_extra_msg}}", canGenerateShareLink: {% if user.permissions.can_generate_share_link %} true {% else %} false {% endif %}, canGenerateUploadLink: {% if user.permissions.can_generate_upload_link %} true {% else %} false {% endif %},