- 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 {requiresAuthenticatedUser} from './lib/page';
|
||||
import {withComponentMixins} from "./lib/decorator-helpers";
|
||||
import mailtrainConfig from 'mailtrainConfig';
|
||||
|
||||
@withComponentMixins([
|
||||
withTranslation,
|
||||
|
@ -16,7 +17,6 @@ export default class List extends Component {
|
|||
}
|
||||
|
||||
static propTypes = {
|
||||
configItems: PropTypes.object
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -26,7 +26,7 @@ export default class List extends Component {
|
|||
<div>
|
||||
<h2>{t('Mailtrain 2 beta')}</h2>
|
||||
<div>{t('Build') + ' 2020-07-18-0813'}</div>
|
||||
<p>{this.props.configItems.shoutout}</p>
|
||||
<p>{mailtrainConfig.shoutout}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -116,10 +116,7 @@ class Root extends Component {
|
|||
structure = {
|
||||
title: t('home'),
|
||||
link: '/',
|
||||
localResolve: {
|
||||
configItems: params => `rest/settings`
|
||||
},
|
||||
panelRender: props => <Home configItems={props.resolved.configItems} />,
|
||||
panelRender: props => <Home />,
|
||||
primaryMenuComponent: MainMenu,
|
||||
children: {
|
||||
...login.getMenus(t),
|
||||
|
|
|
@ -33,7 +33,7 @@ async function getAuthenticatedConfig(context) {
|
|||
globalPermissions[perm] = true;
|
||||
}
|
||||
|
||||
const setts = await settings.get(contextHelpers.getAdminContext(), ['mapsApiKey']);
|
||||
const setts = await settings.get(contextHelpers.getAdminContext(), ['mapsApiKey', 'shoutout']);
|
||||
|
||||
return {
|
||||
defaultCustomFormValues: await forms.getDefaultCustomFormValues(),
|
||||
|
@ -49,7 +49,8 @@ async function getAuthenticatedConfig(context) {
|
|||
verpEnabled: config.verp.enabled,
|
||||
reportsEnabled: config.reports.enabled,
|
||||
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