MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / Authorized

Function Authorized

src/components/Authorized/Authorized.jsx:5–19  ·  view source on GitHub ↗
({
  children,
  authority,
  noMatch = (
    <Result
      status={403}
      title="403"
      subTitle="Sorry, you are not authorized to access this page."
    />
  ),
})

Source from the content-addressed store, hash-verified

3import check from './CheckPermissions';
4
5const Authorized = ({
6 children,
7 authority,
8 noMatch = (
9 <Result
10 status={403}
11 title="403"
12 subTitle="Sorry, you are not authorized to access this page."
13 />
14 ),
15}) => {
16 const childrenRender = typeof children === 'undefined' ? null : children;
17 const dom = check(authority, childrenRender, noMatch);
18 return <>{dom}</>;
19};
20
21export default Authorized;

Callers

nothing calls this directly

Calls 1

checkFunction · 0.85

Tested by

no test coverage detected