Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

436 B
Raw Blame
export function missingPermissions(
  statements: Record<string, readonly string[]> | null,
  required: Record<string, readonly string[]>,
): string[] {
  const missing: string[] = [];
  for (const [resource, actions] of Object.entries(required)) {
    const granted = statements?.[resource];
    for (const action of actions) {
      if (!granted?.includes(action)) missing.push(`${resource}:${action}`);
    }
  }
  return missing;
}