- Fix - A non-admin user would get permission denied on all pages.
This commit is contained in:
parent
3828411faf
commit
564c83720b
3 changed files with 6 additions and 8 deletions
|
@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
|
||||||
import {withTranslation} from './lib/i18n';
|
import {withTranslation} from './lib/i18n';
|
||||||
import {requiresAuthenticatedUser} from './lib/page';
|
import {requiresAuthenticatedUser} from './lib/page';
|
||||||
import {withComponentMixins} from "./lib/decorator-helpers";
|
import {withComponentMixins} from "./lib/decorator-helpers";
|
||||||
|
import mailtrainConfig from 'mailtrainConfig';
|
||||||
|
|
||||||
@withComponentMixins([
|
@withComponentMixins([
|
||||||
withTranslation,
|
withTranslation,
|
||||||
|
@ -16,7 +17,6 @@ export default class List extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
configItems: PropTypes.object
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -26,7 +26,7 @@ export default class List extends Component {
|
||||||
<div>
|
<div>
|
||||||
<h2>{t('Mailtrain 2 beta')}</h2>
|
<h2>{t('Mailtrain 2 beta')}</h2>
|
||||||
<div>{t('Build') + ' 2020-07-18-0813'}</div>
|
<div>{t('Build') + ' 2020-07-18-0813'}</div>
|
||||||
<p>{this.props.configItems.shoutout}</p>
|
<p>{mailtrainConfig.shoutout}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,10 +116,7 @@ class Root extends Component {
|
||||||
structure = {
|
structure = {
|
||||||
title: t('home'),
|
title: t('home'),
|
||||||
link: '/',
|
link: '/',
|
||||||
localResolve: {
|
panelRender: props => <Home />,
|
||||||
configItems: params => `rest/settings`
|
|
||||||
},
|
|
||||||
panelRender: props => <Home configItems={props.resolved.configItems} />,
|
|
||||||
primaryMenuComponent: MainMenu,
|
primaryMenuComponent: MainMenu,
|
||||||
children: {
|
children: {
|
||||||
...login.getMenus(t),
|
...login.getMenus(t),
|
||||||
|
|
|
@ -33,7 +33,7 @@ async function getAuthenticatedConfig(context) {
|
||||||
globalPermissions[perm] = true;
|
globalPermissions[perm] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const setts = await settings.get(contextHelpers.getAdminContext(), ['mapsApiKey']);
|
const setts = await settings.get(contextHelpers.getAdminContext(), ['mapsApiKey', 'shoutout']);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
defaultCustomFormValues: await forms.getDefaultCustomFormValues(),
|
defaultCustomFormValues: await forms.getDefaultCustomFormValues(),
|
||||||
|
@ -49,7 +49,8 @@ async function getAuthenticatedConfig(context) {
|
||||||
verpEnabled: config.verp.enabled,
|
verpEnabled: config.verp.enabled,
|
||||||
reportsEnabled: config.reports.enabled,
|
reportsEnabled: config.reports.enabled,
|
||||||
mapsApiKey: setts.mapsApiKey,
|
mapsApiKey: setts.mapsApiKey,
|
||||||
builtinZoneMTAEnabled: config.builtinZoneMTA.enabled
|
builtinZoneMTAEnabled: config.builtinZoneMTA.enabled,
|
||||||
|
shoutout: setts.shoutout
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue