trc-client-core
Version:
The core of the TRC Client
23 lines (20 loc) • 590 B
JSX
import React from 'react';
import Permissions from 'trc-client-core/src/user/Permissions';
var TechnicalHandler = React.createClass({
statics: {
willTransitionTo: function (transition) {
var permTest;
switch (transition.path) {
default:
permTest = Permissions.get('TECHNICAL');
}
if(!permTest) {
transition.redirect('Unauthorized');
}
}
},
render() {
return this.props.children;
}
});
module.exports = TechnicalHandler;