eclipse-tractusx / portal-frontend

Portal Frontend
Apache License 2.0
3 stars 30 forks source link

Service Manager User | Service Management -> Admin Board | 403 Forbidden #936

Closed tfjanjua closed 1 month ago

tfjanjua commented 1 month ago

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

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:

but Service Manager user account doesn’t have such permissions, I can share Service Manager user account’s access token and its existing list of permissions, if required.

From frontend: I found that frontend is showing or hiding this Admin Board page on the basis of following roles:

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.

tfjanjua commented 1 month ago

This issue https://github.com/eclipse-tractusx/portal-backend/issues/831 was created on backend repo with the assumption that this issue could be resolved from backend side but the issue needs to be resolved from the frontend side.

evegufy commented 1 month ago

@tfjanjua thank you for analysing!

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

tfjanjua commented 1 month ago

Closing this issue as related PR has been merged