Add manageNamespaces redirect in client side
This commit is contained in:
parent
d36cc303fb
commit
a180d49612
2 changed files with 10 additions and 1 deletions
|
@ -93,6 +93,10 @@ export default class CUD extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
const t = this.props.t;
|
||||
if (!mailtrainConfig.globalPermissions.manageNamespaces) {
|
||||
this.navigateToWithFlashMessage('/', 'danger', t('permissionDenied')+': manageNamespaces');
|
||||
}
|
||||
if (this.props.entity) {
|
||||
this.getFormValuesFromEntity(this.props.entity);
|
||||
} else {
|
||||
|
|
|
@ -29,7 +29,12 @@ export default class List extends Component {
|
|||
static propTypes = {
|
||||
permissions: PropTypes.object
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const t = this.props.t;
|
||||
if (!mailtrainConfig.globalPermissions.manageNamespaces) {
|
||||
this.navigateToWithFlashMessage('/', 'danger', t('permissionDenied')+': manageNamespaces');
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const t = this.props.t;
|
||||
|
||||
|
|
Loading…
Reference in a new issue