RightsMatrix
Rights by group: checkboxes that keep requirements, or marks with the roles that grant them.
Project1 of 3The project's name, settings and picture.
Keys2 of 4API keys of members and service accounts.
Models2 of 3Models, aliases and routing.
Logs1 of 3Request logs and their content.
Members1 of 4Who is in the project and what they can do.
function Role() {
const [groups, setGroups] = useState(PROJECT_GROUPS);
return (
<RightsMatrix className="w-640" searchable aria-label="Rights of Support lead" groups={groups} onRightsChange={(c) => setGroups((gs) => apply(gs, c))} />
);
}import { RightsMatrix } from "@logicplanes/kaeso-ui";Props
aria-labelstringThe accessible name of the matrix.
groupsRightsGroup[]The rights, by category, with who holds each.
onChange((code: string, granted: boolean) => void)The right the person toggled. With requirements, prefer
onRightsChange, which has every change at once.onRightsChange((changes: RightChange[]) => void)Every change one toggle makes, the toggled right first, then what it required or what required it.
originLabelsPartial<Record<"none" | "preset" | "added" | "removed", string>>What the origin column says:
{ preset: "From Developer" }. Defaults to "From role", "Added" and "Removed" in the provider's language.readOnlybooleanNo checkboxes: a mark per right and the roles that grant it.
searchablebooleanA search field above the groups that filters rights by name, code, description or group.