Skip to content

Commit

Permalink
Merge pull request #819 from AnuGayan/main-4.4.0-alpha
Browse files Browse the repository at this point in the history
Fix publisher ui issues with observer only user
  • Loading branch information
RakhithaRR authored Oct 23, 2024
2 parents 9190d9b + 416f775 commit b76c4c4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
2 changes: 0 additions & 2 deletions portals/publisher/src/main/webapp/site/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,6 @@
"Apis.Listing.SampleAPI.popup.revision.inprogress": "Creating a revision of sample API ...",
"Apis.Listing.SampleAPI.popup.update.complete": "API updated successfully!",
"Apis.Listing.SampleAPI.popup.update.inprogress": "Updating sample API ...",
"Apis.Listing.SampleAPIProduct.creator.error": "API is not deployed yet! Please deploy the API before trying out",
"Apis.Listing.SampleAPIProduct.description": "Combine multiple API resources in to a single API",
"Apis.Listing.SampleAPIProduct.onboarding.menu.card.name": "API Product",
"Apis.Listing.TableView.TableView.def.flag": "[Def]",
Expand Down Expand Up @@ -2070,7 +2069,6 @@
"Workflow.subscriptionupdate.updateStatus.has.errors": "Unable to complete subscription update approve/reject process.",
"api.console.security.heading": "Security",
"app.components.Shared.Banner.back": "Back",
"app.components.Shared.onboarding.insufficient.permissions": "*You are not authorized to create or update {name} due to insufficient permissions",
"block.all": "Block All",
"block.production.only": "Block Production Only",
"by": "By",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
import React from 'react';
import { withRouter } from 'react-router';
import { useTheme } from '@mui/material';
import Grid from '@mui/material/Grid';
import OnboardingMenuCard from 'AppComponents/Shared/Onboarding/OnboardingMenuCard';
import Onboarding from 'AppComponents/Shared/Onboarding/Onboarding';
import { PropTypes } from 'prop-types';
import { FormattedMessage, injectIntl, useIntl } from 'react-intl';
import AuthManager from 'AppData/AuthManager';
import Alert from 'AppComponents/Shared/MuiAlert';

/**
* Show Initial Welcome card if no APIs are available to list
Expand Down Expand Up @@ -53,20 +51,6 @@ function SampleAPI() {
/>
)}
>
{AuthManager.isNotPublisher()
&& (
<>
<Grid item xs={6}>
<Alert variant='outlined' severity='warning'>
<FormattedMessage
id='Apis.Listing.SampleAPIProduct.creator.error'
defaultMessage='API is not deployed yet! Please deploy the API before trying out'
/>
</Alert>
</Grid>
<Grid item xs={12} />
</>
)}
<OnboardingMenuCard
disabled={AuthManager.isNotPublisher()}
id='itest-id-create-api-product'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@

import React, { useState } from 'react';
import { styled } from '@mui/material/styles';
import Typography from '@mui/material/Typography';
import Box from '@mui/material/Box';
import Grid from '@mui/material/Grid';
import Configurations from 'Config';
import { Link as RouterLink } from 'react-router-dom';
import Link from '@mui/material/Link';
import { FormattedMessage } from 'react-intl';

const PREFIX = 'RestAPIMenu';

Expand Down Expand Up @@ -126,20 +124,6 @@ const RestAPIMenu = (props) => {
{name}
</Box>
</Grid>
<Grid item xs={11}>
{disabled && (
<Box>
<Typography variant='body2' color='primary'>
<FormattedMessage
id='app.components.Shared.onboarding.insufficient.permissions'
defaultMessage={'*You are not authorized to create or update'
+ ' {name} due to insufficient permissions'}
values={{ name: name.toLowerCase() }}
/>
</Typography>
</Box>
)}
</Grid>
</Grid>
</Box>
</Component>
Expand Down

0 comments on commit b76c4c4

Please sign in to comment.