[KEYCLOAK-12533] Applications UI has erroneous "Remove Access" button

This commit is contained in:
Bruno Oliveira da Silva 2019-12-19 08:11:27 -03:00
parent 54b69bd1dc
commit c0aa0891cd

View file

@ -33,7 +33,7 @@ import { InfoAltIcon, CheckIcon, LinkIcon, BuilderImageIcon } from '@patternfly/
import { ContentPage } from '../ContentPage'; import { ContentPage } from '../ContentPage';
import { ContinueCancelModal } from '../../widgets/ContinueCancelModal'; import { ContinueCancelModal } from '../../widgets/ContinueCancelModal';
import { AccountServiceClient } from '../../account-service/account.service'; import { AccountServiceClient } from '../../account-service/account.service';
import {Msg} from '../../widgets/Msg'; import { Msg } from '../../widgets/Msg';
declare const locale: string; declare const locale: string;
@ -122,7 +122,7 @@ export class ApplicationsPage extends React.Component<ApplicationsPageProps, App
<DataListItemCells <DataListItemCells
dataListCells={[ dataListCells={[
<DataListCell width={2} key={'app-' + appIndex}> <DataListCell width={2} key={'app-' + appIndex}>
<BuilderImageIcon size='sm'/> {application.clientName ? application.clientName : application.clientId} <BuilderImageIcon size='sm' /> {application.clientName ? application.clientName : application.clientId}
</DataListCell>, </DataListCell>,
<DataListCell width={2} key={'internal-' + appIndex}> <DataListCell width={2} key={'internal-' + appIndex}>
{application.userConsentRequired ? Msg.localize('thirdPartyApp') : Msg.localize('internalApp')} {application.userConsentRequired ? Msg.localize('thirdPartyApp') : Msg.localize('internalApp')}
@ -178,6 +178,7 @@ export class ApplicationsPage extends React.Component<ApplicationsPageProps, App
</Grid> </Grid>
<Grid gutter='sm'> <Grid gutter='sm'>
<hr /> <hr />
{application.consent &&
<GridItem> <GridItem>
<React.Fragment> <React.Fragment>
<ContinueCancelModal <ContinueCancelModal
@ -190,6 +191,7 @@ export class ApplicationsPage extends React.Component<ApplicationsPageProps, App
/> />
</React.Fragment> </React.Fragment>
</GridItem> </GridItem>
}
<GridItem><InfoAltIcon /> {Msg.localize('infoMessage')}</GridItem> <GridItem><InfoAltIcon /> {Msg.localize('infoMessage')}</GridItem>
</Grid> </Grid>
</DataListContent> </DataListContent>