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(role): typo fix for the role to hide admin board page for service manager #937

Conversation

saadanzari
Copy link
Contributor

Description

Current Behavior
Service Management -> Admin Board page is not showing the Services and responding 403 Forbidden error.

Expected Behavior
Service Manager should be able to see services list on Admin Board page OR Service Manager should not see Admin Board sub-menu option under Service Management menu if Service Manager doesn't supposed to have related permissions.

Steps To Reproduce

  • Login to the portal as a Service Manager
  • Mouse Hover on Service Management menu and click on Admin Board option

Findings
Service Management -> Admin Board page is calling the API: https://portal-backend.entry.cofinity-x.com/api/services/serviceRelease/inReview?size=15&page=0&status=InReview&sorting=DateDesc

and this API has following permissions:

  • approve_service_release
  • decline_service_release

but Service Manager user account doesn’t have such permissions.

Why

In frontend these are the following roles:

APPROVE_SERVICE_RELEASE = 'activate_subscription'
DECLINE_SERVICE_RELEASE = 'decline_service_release'

So, the issue seems to be at the frontend side that APPROVE_SERVICE_RELEASE variable as wrong role value (activate_subscription) which needs to be corrected by approve_service_release value so, that this Admin Board page would only be visible to the users who would have same roles as API roles.

Issue

#936

Checklist

  • I have performed a self-review of my own code
  • I have successfully tested my changes locally

Copy link
Contributor

@evegufy evegufy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank for the contributions!

could you please solve the conflict with the changelog file?

Please also update the dependencies file (you can download the artifact here and commit the updated file https://github.com/eclipse-tractusx/portal-frontend/actions/runs/9956456758?pr=937)

In general, it would be great if you could not link to closed systems like your entry "entry" environment, such an example link is much more friendly in the open: https://portal-backend.example.org/api/services/serviceRelease/inReview?size=15&page=0&status=InReview&sorting=DateDesc

@evegufy evegufy changed the base branch from release/v2.1.0-RC2 to release/v2.1.0-RC3 July 17, 2024 14:38
@typecastcloud
Copy link
Contributor

typecastcloud commented Jul 18, 2024

Thank for the contributions!

could you please solve the conflict with the changelog file?

Please also update the dependencies file (you can download the artifact here and commit the updated file https://github.com/eclipse-tractusx/portal-frontend/actions/runs/9956456758?pr=937)

In general, it would be great if you could not link to closed systems like your entry "entry" environment, such an example link is much more friendly in the open: https://portal-backend.example.org/api/services/serviceRelease/inReview?size=15&page=0&status=InReview&sorting=DateDesc

As maintainer you should have the ability to modify the PR. We don't. This is his personal fork and no one else has access. Sorry.

@oyo already added a commit

Copy link

@oyo oyo merged commit 0fc6d4e into eclipse-tractusx:release/v2.1.0-RC3 Jul 24, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants