Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix publisher ui issues with observer only user #819

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,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 @@ -2071,7 +2070,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
Loading