Function
Authorized
({
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
| 3 | import check from './CheckPermissions'; |
| 4 | |
| 5 | const 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 | |
| 21 | export default Authorized; |
Callers
nothing calls this directly
Tested by
no test coverage detected