mirror of https://github.com/chillzhuang/Sword
9 lines
288 B
JavaScript
9 lines
288 B
JavaScript
|
import CheckPermissions from './CheckPermissions';
|
||
|
|
||
|
const Authorized = ({ children, authority, noMatch = null }) => {
|
||
|
const childrenRender = typeof children === 'undefined' ? null : children;
|
||
|
return CheckPermissions(authority, childrenRender, noMatch);
|
||
|
};
|
||
|
|
||
|
export default Authorized;
|