From 994ec7b67f427c33fe632dcc701f69bc73f4e4ec Mon Sep 17 00:00:00 2001 From: Sacha Al Himdani Date: Mon, 4 Aug 2025 11:42:34 +0200 Subject: [PATCH] Change Authentification Signed-off-by: Sacha Al Himdani --- .../src/hooks/graph/TrustCenterAccessGraph.ts | 8 +- .../trustCenter/TrustCenterAccessTab.tsx | 11 +- pkg/probo/service.go | 4 - pkg/probo/trust_center_access_service.go | 10 +- pkg/server/api/console/v1/schema/schema.go | 3 - pkg/server/api/trust/v1/auth/auth.go | 59 ++++ pkg/server/api/trust/v1/resolver.go | 260 +++++++++--------- .../trust/v1/trust_center_access_handler.go | 55 ++-- pkg/trust/service.go | 8 +- 9 files changed, 229 insertions(+), 189 deletions(-) create mode 100644 pkg/server/api/trust/v1/auth/auth.go diff --git a/apps/console/src/hooks/graph/TrustCenterAccessGraph.ts b/apps/console/src/hooks/graph/TrustCenterAccessGraph.ts index 64c25eccb..8c22ae77c 100644 --- a/apps/console/src/hooks/graph/TrustCenterAccessGraph.ts +++ b/apps/console/src/hooks/graph/TrustCenterAccessGraph.ts @@ -1,5 +1,9 @@ import { graphql } from 'react-relay'; import { useLazyLoadQuery } from 'react-relay'; +import type { + TrustCenterAccessGraphQuery, + TrustCenterAccessGraphQuery$data +} from "./__generated__/TrustCenterAccessGraphQuery.graphql"; export const trustCenterAccessesQuery = graphql` query TrustCenterAccessGraphQuery($trustCenterId: ID!) { @@ -90,6 +94,6 @@ export const deleteTrustCenterAccessMutation = graphql` } `; -export function useTrustCenterAccesses(trustCenterId: string) { - return useLazyLoadQuery(trustCenterAccessesQuery, { trustCenterId }); +export function useTrustCenterAccesses(trustCenterId: string): TrustCenterAccessGraphQuery$data { + return useLazyLoadQuery(trustCenterAccessesQuery, { trustCenterId }); } diff --git a/apps/console/src/pages/organizations/trustCenter/TrustCenterAccessTab.tsx b/apps/console/src/pages/organizations/trustCenter/TrustCenterAccessTab.tsx index 7f61f152c..2635c210b 100644 --- a/apps/console/src/pages/organizations/trustCenter/TrustCenterAccessTab.tsx +++ b/apps/console/src/pages/organizations/trustCenter/TrustCenterAccessTab.tsx @@ -9,7 +9,6 @@ import { deleteTrustCenterAccessMutation } from "/hooks/graph/TrustCenterAccessGraph"; import { useMutation } from "react-relay"; -import type { TrustCenterAccessGraphQuery$data } from "/hooks/graph/__generated__/TrustCenterAccessGraphQuery.graphql"; type ContextType = { organization: { @@ -41,7 +40,7 @@ export default function TrustCenterAccessTab() { createdAt: Date; }; - const data = useTrustCenterAccesses(organization.trustCenter?.id || ""); + const trustCenterData = useTrustCenterAccesses(organization.trustCenter?.id || ""); if (!organization.trustCenter?.id) { return ( @@ -63,7 +62,6 @@ export default function TrustCenterAccessTab() { ); } - const trustCenterData = data as TrustCenterAccessGraphQuery$data | null; const accesses: AccessType[] = trustCenterData?.node?.accesses?.edges ? trustCenterData.node.accesses.edges.map(edge => ({ id: edge.node.id, @@ -343,13 +341,6 @@ export default function TrustCenterAccessTab() { -