Added basic RBAC component BOD-232

This commit is contained in:
Patrick Fic
2020-08-10 16:07:30 -07:00
parent 0df61a2701
commit 83c83ac06e
52 changed files with 670 additions and 288 deletions

View File

@@ -8,6 +8,7 @@ import ScoreboardPageComponent from "./scoreboard.page.component";
import { useSubscription } from "@apollo/react-hooks";
import { SUBSCRIPTION_SCOREBOARD } from "../../graphql/scoreboard.queries";
import moment from "moment";
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -38,7 +39,11 @@ export function ScoreboardContainer({ setBreadcrumbs }) {
}, [t, setBreadcrumbs]);
return (
<ScoreboardPageComponent scoreboardSubscription={scoreboardSubscription} />
<RbacWrapper action="scoreboard:view">
<ScoreboardPageComponent
scoreboardSubscription={scoreboardSubscription}
/>
</RbacWrapper>
);
}
export default connect(