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: display user management navigation button based on role validation #1073

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
22 changes: 8 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# Changelog

## Unreleased

### Bugfixes

- **Connector Management**
- fixed technical user selection

## 2.2.0-RC2
## Unreleased 2.2.0-RC3

### Feature

Expand All @@ -16,12 +9,6 @@
- **Company Subscription Management**
- Extended the subscription detail page for customer to include more app-related information [#1051](https://github.com/eclipse-tractusx/portal-frontend/pull/1051)

### BugFix

- Technical User
- Show appropriate error message.
- Fix closing page notification bar issue

### Change

- **Technical User Management**
Expand All @@ -35,6 +22,11 @@

### Bugfixes

- **Connector Management**
- fixed technical user selection
- **Technical User**
- Show appropriate error message.
- Fix closing page notification bar issue
- **IDP management**
- Fixed statusTag color in status coloumn [#978](https://github.com/eclipse-tractusx/portal-frontend/pull/978)
- **Connector Management**
Expand All @@ -45,6 +37,8 @@
- Fixed 'activeTab' conditions to load data for Tab-2(Registration Process) [#1050](https://github.com/eclipse-tractusx/portal-frontend/pull/1050)
- **App Release Process**:
- Fixed role upload does not work using Firefox [#1003](https://github.com/eclipse-tractusx/portal-frontend/pull/1003)
- **Technical User Management**
- Display technicalUserManagement button based on role validation [#1073](https://github.com/eclipse-tractusx/portal-frontend/pull/1073)
- **OSP Consent form**
- Display invited company name in OSP consent form (Previously hard coded with 'BMW') [#1083](https://github.com/eclipse-tractusx/portal-frontend/pull/1083)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { useEffect } from 'react'
import { SubNavigation } from '@catena-x/portal-shared-components'
import { useTranslation } from 'react-i18next'
import { useNavigate } from 'react-router-dom'
import UserService from 'services/UserService'
import { PAGES, ROLES } from 'types/Constants'

export const StageSubNavigation = () => {
const { t } = useTranslation()
Expand All @@ -44,9 +46,13 @@ export const StageSubNavigation = () => {

return (
<SubNavigation
buttonLabel={t('navigation.subNavigation.buttonLabel')}
buttonLabel={
(UserService.hasRole(ROLES.TECH_USER_VIEW) &&
t('navigation.subNavigation.buttonLabel')) ||
undefined
}
onButtonClick={() => {
navigate('/technicalUserManagement')
navigate(`/${PAGES.TECH_USER_MANAGEMENT}`)
}}
link1Label={t('navigation.subNavigation.link1Label')}
onLink1Click={() => {
Expand Down
Loading