Authorized.js 376 Bytes
Newer Older
ddcat1115's avatar
ddcat1115 committed
1 2 3 4 5 6 7
import React from 'react';
import CheckPermissions from './CheckPermissions';

class Authorized extends React.Component {
  render() {
    const { children, authority, noMatch = null } = this.props;
    const childrenRender = typeof children === 'undefined' ? null : children;
8
    return CheckPermissions(authority, childrenRender, noMatch);
ddcat1115's avatar
ddcat1115 committed
9 10 11 12
  }
}

export default Authorized;