Skip to content

Commit

Permalink
Fixing scope issue
Browse files Browse the repository at this point in the history
  • Loading branch information
HiranyaKavishani committed Oct 23, 2023
1 parent a2e092c commit 5e4ecc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ function CreateNewVersionButton(props) {
return (
<>
{/* allowing create new version based on scopes */}
<ScopeValidation resourceMethod={resourceMethod.POST} resourcePath={resourcePath.API_COPY}>
<ScopeValidation resourceMethod={resourceMethod.POST}
resourcePath={isAPIProduct ? resourcePath.API_PRODUCT_COPY : resourcePath.API_COPY}>
<div className={classes.createNewVersionWrapper} id='create-new-version-btn'>
<VerticalDivider height={70} />
<Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const resourcePath = {
API_GW_CONFIG: '/apis/{apiId}/gateway-config',
API_THUMBNAIL: '/apis/{apiId}/thumbnail',
API_COPY: '/apis/copy-api',
API_PRODUCT_COPY: '/api-products/copy-api-products',
API_LC_HISTORY: '/apis/{apiId}/lifecycle-history',
API_CHANGE_LC: '/apis/change-lifecycle',
API_LC: '/apis/{apiId}/lifecycle',
Expand Down

0 comments on commit 5e4ecc4

Please sign in to comment.