update policy access control

This commit is contained in:
Fred KISSIE
2026-03-03 01:33:37 +01:00
parent 033cc62ce7
commit 5c280b024e
6 changed files with 335 additions and 190 deletions

View File

@@ -38,13 +38,14 @@ export function ResourcePolicyProvider({
};
return (
<ResourcePolicyContext value={{ ...policy, updatePolicy }}>
<ResourcePolicyContext value={{ policy, updatePolicy }}>
{children}
</ResourcePolicyContext>
);
}
export type ResourcePolicyContextType = GetResourcePolicyResponse & {
export type ResourcePolicyContextType = {
policy: GetResourcePolicyResponse;
updatePolicy: (updatedPolicy: Partial<GetResourcePolicyResponse>) => void;
};