Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
import { subject } from "@casl/ability";
import { ProjectPermissionCan } from "@app/components/permissions";
import { ProjectPermissionIdentityActions, ProjectPermissionSub } from "@app/context";
import { AlertResourceType } from "@app/hooks/api/alerts";
import { AlertAction } from "@app/views/Alerts";
type Props = {
identityId: string;
projectId?: string;
readOnly?: boolean;
};
export const ProjectIdentityAlertAction = ({ identityId, projectId, readOnly = false }: Props) => (
<AlertAction
resourceType={AlertResourceType.IdentityAuthentication}
resourceId={identityId}
projectId={projectId}
readOnly={readOnly}
renderPermissionGate={(render) => (
<ProjectPermissionCan
I={ProjectPermissionIdentityActions.Edit}
a={subject(ProjectPermissionSub.Identity, { identityId })}
>
{render}
</ProjectPermissionCan>
)}
/>
);