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() {
|
componentDidMount() {
|
||||||
|
const t = this.props.t;
|
||||||
|
if (!mailtrainConfig.globalPermissions.manageNamespaces) {
|
||||||
|
this.navigateToWithFlashMessage('/', 'danger', t('permissionDenied')+': manageNamespaces');
|
||||||
|
}
|
||||||
if (this.props.entity) {
|
if (this.props.entity) {
|
||||||
this.getFormValuesFromEntity(this.props.entity);
|
this.getFormValuesFromEntity(this.props.entity);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -29,7 +29,12 @@ export default class List extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
permissions: PropTypes.object
|
permissions: PropTypes.object
|
||||||
}
|
}
|
||||||
|
componentDidMount() {
|
||||||
|
const t = this.props.t;
|
||||||
|
if (!mailtrainConfig.globalPermissions.manageNamespaces) {
|
||||||
|
this.navigateToWithFlashMessage('/', 'danger', t('permissionDenied')+': manageNamespaces');
|
||||||
|
}
|
||||||
|
}
|
||||||
render() {
|
render() {
|
||||||
const t = this.props.t;
|
const t = this.props.t;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue