Skip to content

Commit

Permalink
fix: Use impersonated user if present (#1196)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleixhub authored May 10, 2023
1 parent f4b590c commit 62a590b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion catalog/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ui:
name: # default use chart name + '-ui'
image:
#override:
tag: v0.29.6
tag: v0.29.7
repository: quay.io/redhat-gpte/babylon-catalog-ui
pullPolicy: IfNotPresent
replicaCount: 1
Expand Down
5 changes: 4 additions & 1 deletion catalog/ui/src/app/components/LabInterfaceLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Button } from '@patternfly/react-core';
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
import ButtonCircleIcon from './ButtonCircleIcon';
import useSession from '@app/utils/useSession';
import useImpersonateUser from '@app/utils/useImpersonateUser';

function submitFormFromLink(e: any) {
e.preventDefault();
Expand All @@ -15,7 +16,9 @@ const LabInterfaceLink: React.FC<{
url: string;
variant?: 'primary' | 'secondary' | 'circle';
}> = ({ data, method, url, variant }) => {
const { authUser: user } = useSession().getSession();
const { authUser } = useSession().getSession();
const { userImpersonated } = useImpersonateUser();
const user = userImpersonated || authUser;
const email = user.includes('@')
? user
: user.includes('-')
Expand Down

0 comments on commit 62a590b

Please sign in to comment.