chore: cleanup

This commit is contained in:
Daniel Hougaard
2024-10-26 23:26:22 +04:00
parent 741138c4bd
commit 9eb7640755
14 changed files with 13 additions and 54 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ export const SelectItem = forwardRef<HTMLDivElement, SelectItemProps>(
cursor-pointer select-none items-center overflow-hidden text-ellipsis whitespace-nowrap rounded-md py-2
pl-10 pr-4 text-sm outline-none transition-all hover:bg-mineshaft-500 data-[highlighted]:bg-mineshaft-700/80`,
isSelected && "bg-primary",
isDisabled && "cursor-not-allowed text-gray-600 opacity-80 hover:!bg-transparent",
isDisabled && "cursor-not-allowed text-gray-600 opacity-80 hover:!bg-transparent",
className
)}
ref={forwardedRef}
@@ -137,7 +137,6 @@ export const useUpdateIdentityUniversalAuth = () => {
return useMutation<IdentityUniversalAuth, {}, UpdateIdentityUniversalAuthDTO>({
mutationFn: async ({
identityId,
clientSecretTrustedIps,
accessTokenTTL,
accessTokenMaxTTL,
@@ -216,13 +216,12 @@ export const IdentityPage = withPermission(
handlePopUpOpen("identityAuthMethod", {
identityId,
name: data.identity.name,
authMethod: selectedAuthMethod,
allAuthMethods: data.identity.authMethods
});
}}
disabled={!isAllowed}
>
{`${data.identity.authMethods?.[0] ? "Edit" : "Configure"} Auth Method`}
Add new auth method
</DropdownMenuItem>
)}
</OrgPermissionCan>
@@ -70,7 +70,6 @@ export const IdentityAuthenticationSection = ({
handlePopUpOpen("identityAuthMethod", {
identityId,
name: data.identity.name,
// authMethod: IdentityAuthMethod.UNIVERSAL_AUTH,
allAuthMethods: data.identity.authMethods
})
}
@@ -62,8 +62,6 @@ export const IdentityClientSecretModal = ({ popUp, handlePopUpToggle }: Props) =
identityId: string;
};
console.log(popUpData);
const onFormSubmit = async ({ description, ttl, numUsesLimit }: FormData) => {
try {
const { clientSecret } = await createClientSecret({
@@ -292,18 +292,12 @@ export const IdentityAuthMethodModal = ({ popUp, handlePopUpOpen, handlePopUpTog
deleteKey="confirm"
buttonText="Remove"
onDeleteApproved={async () => {
if (!identityAuthMethodData.authMethod || !orgId) {
return;
}
const selectedRevoke = methodMap[identityAuthMethodData.authMethod];
if (!selectedRevoke) {
if (!identityAuthMethodData.authMethod || !orgId || !selectedMethodItem) {
return;
}
try {
await selectedRevoke.revokeMethod({
await selectedMethodItem.revokeMethod({
identityId: identityAuthMethodData.identityId,
organizationId: orgId
});