Files
homarr/apps/nextjs/src/components/board/permissions/client.ts
T
Meier Lukas 7ab9dc2501 feat: implement board access control (#349)
* feat: implement board access control

* fix: deepsource issues

* wip: address pull request feedback

* chore: address pull request feedback

* fix: format issue

* test: improve tests

* fix: type and lint issue

* chore: address pull request feedback

* refactor: rename board procedures
2024-04-30 21:32:55 +02:00

9 lines
350 B
TypeScript

import { useSession } from "@homarr/auth/client";
import type { BoardPermissionsProps } from "@homarr/auth/shared";
import { constructBoardPermissions } from "@homarr/auth/shared";
export const useBoardPermissions = (board: BoardPermissionsProps) => {
const { data: session } = useSession();
return constructBoardPermissions(board, session);
};