mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-19 01:17:18 +02:00
* fix: group project access inconsistencies * fix relative path * wip * refactor: make project tabs work as routes * refactor: finish refactoring project assign forms * fix: update snaps * fix: update snaps * add some basic cypress e2e tests to groups * add remaining cypress e2e tests for group CRUD * add groups e2e to gh workflows * refactor: simplify useMemo usage * add GO_BACK navigate const * fix: remove trailing slash on user creation request Co-authored-by: olav <mail@olav.io> Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
25 lines
751 B
TypeScript
25 lines
751 B
TypeScript
import { ProjectAccessAssign } from '../ProjectAccessAssign/ProjectAccessAssign';
|
|
import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
|
|
import useProjectAccess from 'hooks/api/getters/useProjectAccess/useProjectAccess';
|
|
import { useAccess } from 'hooks/api/getters/useAccess/useAccess';
|
|
|
|
export const ProjectAccessCreate = () => {
|
|
const projectId = useRequiredPathParam('projectId');
|
|
|
|
const { access } = useProjectAccess(projectId);
|
|
const { users, groups } = useAccess();
|
|
|
|
if (!access || !users || !groups) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<ProjectAccessAssign
|
|
accesses={access.rows}
|
|
users={users}
|
|
groups={groups}
|
|
roles={access.roles}
|
|
/>
|
|
);
|
|
};
|