Skip to content

Commit

Permalink
Fix regenerate menu item check
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonesy committed May 18, 2023
1 parent 400b9cb commit fcf5cea
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
23 changes: 23 additions & 0 deletions src/mocks/resolvers/service-accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,29 @@ asdf0jas0dfja0sdfj0as9dfja0sd9fj09sdfj0asjdf0as9jf09asjf0a9sjfa0s9djf0asdjf0asdj
isApproved: true,
isIssued: true,
},
{
id: '888',
name: 'ialdkfjasd0f',
active: true,
application: {
name: 'Shoppers Drug Mart 888',
},
productEnvironment: {
id: '175',
name: 'dev',
flow: 'client-credentials',
product: {
id: '166',
name: 'Demo App',
},
credentialIssuer: {
clientAuthenticator: 'client-secret',
},
},
isComplete: true,
isApproved: true,
isIssued: true,
},
],
})
);
Expand Down
8 changes: 4 additions & 4 deletions src/nextapp/components/access-list/access-list-row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@ const AccessListRow: React.FC<AccessListRowProps> = ({
'kong-api-key-only',
'kong-api-key-acl',
'client-credentials',
].includes(data.productEnvironment.flow) ||
(data.productEnvironment?.credentialIssuer
?.clientAuthenticator === 'client-secret' && (
].includes(data.productEnvironment.flow) &&
data.productEnvironment?.credentialIssuer?.clientAuthenticator ===
'client-secret' && (
<MenuItem
data-testid="regenerate-credentials-btn"
onClick={onOpen}
>
Regenerate Credentials
</MenuItem>
))}
)}
{data.productEnvironment?.credentialIssuer?.clientAuthenticator ===
'client-jwt-jwks-url' &&
controls.jwksUrl && (
Expand Down

0 comments on commit fcf5cea

Please sign in to comment.