|
@@ -13,7 +13,7 @@ import { CrowiRequest } from '~/interfaces/crowi-request';
|
|
|
import PluginUtils from '~/server/plugins/plugin-utils';
|
|
import PluginUtils from '~/server/plugins/plugin-utils';
|
|
|
import ConfigLoader from '~/server/service/config-loader';
|
|
import ConfigLoader from '~/server/service/config-loader';
|
|
|
import {
|
|
import {
|
|
|
- useCurrentUser, /* useSearchServiceConfigured, */ useIsMailerSetup, useIsSearchServiceReachable, useSiteUrl,
|
|
|
|
|
|
|
+ useCurrentUser, /* useSearchServiceConfigured, */ useIsAclEnabled, useIsMailerSetup, useIsSearchServiceReachable, useSiteUrl,
|
|
|
} from '~/stores/context';
|
|
} from '~/stores/context';
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
@@ -51,7 +51,7 @@ type Props = CommonProps & {
|
|
|
yarnVersion: string,
|
|
yarnVersion: string,
|
|
|
installedPlugins: any,
|
|
installedPlugins: any,
|
|
|
envVars: any,
|
|
envVars: any,
|
|
|
-
|
|
|
|
|
|
|
+ isAclEnabled: boolean,
|
|
|
isSearchServiceConfigured: boolean,
|
|
isSearchServiceConfigured: boolean,
|
|
|
isSearchServiceReachable: boolean,
|
|
isSearchServiceReachable: boolean,
|
|
|
isMailerSetup: boolean,
|
|
isMailerSetup: boolean,
|
|
@@ -144,6 +144,7 @@ const AdminMarkdownSettingsPage: NextPage<Props> = (props: Props) => {
|
|
|
// useSearchServiceConfigured(props.isSearchServiceConfigured);
|
|
// useSearchServiceConfigured(props.isSearchServiceConfigured);
|
|
|
useIsSearchServiceReachable(props.isSearchServiceReachable);
|
|
useIsSearchServiceReachable(props.isSearchServiceReachable);
|
|
|
|
|
|
|
|
|
|
+ useIsAclEnabled(props.isAclEnabled);
|
|
|
useSiteUrl(props.siteUrl);
|
|
useSiteUrl(props.siteUrl);
|
|
|
|
|
|
|
|
// useEnvVars(props.envVars);
|
|
// useEnvVars(props.envVars);
|
|
@@ -195,7 +196,7 @@ export const getServerSideProps: GetServerSideProps = async(context: GetServerSi
|
|
|
const req: CrowiRequest = context.req as CrowiRequest;
|
|
const req: CrowiRequest = context.req as CrowiRequest;
|
|
|
const { crowi } = req;
|
|
const { crowi } = req;
|
|
|
const {
|
|
const {
|
|
|
- appService, searchService,
|
|
|
|
|
|
|
+ appService, searchService, aclService,
|
|
|
} = crowi;
|
|
} = crowi;
|
|
|
|
|
|
|
|
const { user } = req;
|
|
const { user } = req;
|
|
@@ -221,6 +222,7 @@ export const getServerSideProps: GetServerSideProps = async(context: GetServerSi
|
|
|
props.yarnVersion = crowi.runtimeVersions.versions.yarn ? crowi.runtimeVersions.versions.yarn.version.version : null;
|
|
props.yarnVersion = crowi.runtimeVersions.versions.yarn ? crowi.runtimeVersions.versions.yarn.version.version : null;
|
|
|
props.installedPlugins = pluginUtils.listPlugins();
|
|
props.installedPlugins = pluginUtils.listPlugins();
|
|
|
props.envVars = await ConfigLoader.getEnvVarsForDisplay(true);
|
|
props.envVars = await ConfigLoader.getEnvVarsForDisplay(true);
|
|
|
|
|
+ props.isAclEnabled = aclService.isAclEnabled();
|
|
|
|
|
|
|
|
props.isSearchServiceConfigured = searchService.isConfigured;
|
|
props.isSearchServiceConfigured = searchService.isConfigured;
|
|
|
props.isSearchServiceReachable = searchService.isReachable;
|
|
props.isSearchServiceReachable = searchService.isReachable;
|