feat: add integration access settings (#725)
* feat: add integration access settings * fix: typecheck and test issues * fix: test timeout * chore: address pull request feedback * chore: add throw if action forbidden for integration permissions * fix: unable to create new migrations because of duplicate prevId in sqlite snapshots * chore: add sqlite migration for integration permissions * test: add unit tests for integration access * test: add permission checks to integration router tests * test: add unit test for integration permissions * chore: add mysql migration * fix: format issues
This commit is contained in:
12
apps/nextjs/src/components/access/form.ts
Normal file
12
apps/nextjs/src/components/access/form.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { createFormContext } from "@homarr/form";
|
||||
|
||||
export interface AccessFormType<TPermission extends string> {
|
||||
items: {
|
||||
principalId: string;
|
||||
permission: TPermission;
|
||||
}[];
|
||||
}
|
||||
|
||||
export const [FormProvider, useFormContext, useForm] = createFormContext<AccessFormType<string>>();
|
||||
|
||||
export type HandleCountChange = (callback: (prev: number) => number) => void;
|
||||
Reference in New Issue
Block a user