Added basic RBAC component BOD-232
This commit is contained in:
@@ -9,6 +9,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import CourtesyCarCreateComponent from "./courtesy-car-create.page.component";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { setBreadcrumbs } from "../../redux/application/application.actions";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -47,9 +48,11 @@ export function CourtesyCarCreateContainer({ bodyshop, setBreadcrumbs }) {
|
||||
}, [t, setBreadcrumbs]);
|
||||
|
||||
return (
|
||||
<Form form={form} autoComplete="new-password" onFinish={handleFinish}>
|
||||
<CourtesyCarCreateComponent />
|
||||
</Form>
|
||||
<RbacWrapper action="courtesycar:create">
|
||||
<Form form={form} autoComplete="new-password" onFinish={handleFinish}>
|
||||
<CourtesyCarCreateComponent />
|
||||
</Form>
|
||||
</RbacWrapper>
|
||||
);
|
||||
}
|
||||
export default connect(
|
||||
|
||||
Reference in New Issue
Block a user