Skip to content
Snippets Groups Projects
Verified Commit 4330fb23 authored by Defendi Alberto's avatar Defendi Alberto
Browse files

Start documentation.

parent 25cb876c
No related branches found
No related tags found
2 merge requests!56Refined auth flow and new website pages.,!49Set up HCO.
Pipeline #12357 passed
...@@ -5,11 +5,17 @@ interface WithAuthProps { ...@@ -5,11 +5,17 @@ interface WithAuthProps {
allowedRoles: string[]; allowedRoles: string[];
} }
export interface Props extends WithAuthProps { interface Props extends WithAuthProps {
children: React.ReactNode; children: React.ReactNode;
} }
/* eslint-disable react/jsx-props-no-spreading */ /* eslint-disable react/jsx-props-no-spreading */
/**
*
* @param WrappedComponent component to be wrapped by the authentication control.
* This creates a "personal area" in the working implementation.
* @returns {FC<T>} wrapped component.
*/
export const withAuthorization = <T extends WithAuthProps = WithAuthProps>( export const withAuthorization = <T extends WithAuthProps = WithAuthProps>(
WrappedComponent: React.ComponentType<T>, WrappedComponent: React.ComponentType<T>,
): FC<T> => { ): FC<T> => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment