mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 16:00:56 +00:00
There was no UI to assign permissions to the Organization Admin role, even though the backend's Role→Permission endpoints (@tria-plc/iamapi-common's role-permissions routes) were already live and unused. Adds a dedicated page — application picker + the existing permission checklist — that assigns/reads permissions for the fixed Organization Admin role, linked from the Organization Admins page. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
21 lines
519 B
TypeScript
21 lines
519 B
TypeScript
import { withHeaders } from "@/record-management/services/api/withHeaders";
|
|
import axiosInstance from "@/shared/services/axiosInstance";
|
|
import { AxiosResponse } from "axios";
|
|
|
|
export interface RoleDto {
|
|
id: string;
|
|
name: { am: string; en: string };
|
|
key: string;
|
|
}
|
|
|
|
export interface RoleListResponse {
|
|
count: number;
|
|
items: RoleDto[];
|
|
}
|
|
|
|
export const getRoles = async (): Promise<AxiosResponse<RoleListResponse>> =>
|
|
axiosInstance.get("/roles", {
|
|
headers: withHeaders(),
|
|
params: { take: 100 },
|
|
});
|