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

Add App Roles (Active app) not providing expected response #573

Closed
jjeroch opened this issue Mar 19, 2024 · 3 comments · Fixed by #622
Closed

Add App Roles (Active app) not providing expected response #573

jjeroch opened this issue Mar 19, 2024 · 3 comments · Fixed by #622
Assignees
Labels
bug Something isn't working

Comments

@jjeroch
Copy link
Contributor

jjeroch commented Mar 19, 2024

While adding roles to an active apps via the API call POST:/api/apps/AppChange/${appId}/role/activeapp
the api response returns "success"

However if we now call the appRoles with
GET: /api/administration/user/owncompany/roles/apps/${appId}
the response is empty

[]

Check needed.
Tests executed on dev
Example app ID: a376f2c7-c5c9-46f6-96c8-4bafee3c2183

Please note: while analysing and fixing the issue; we should consider to move this endpoint to the app controller since this is connected to "apps". As soon as analysis of the issue is done; we should quickly align on the move of the endpoint


After analysing the ticket with Prasanna the following decision was made:
For the app provider an endpoint is needed to fetch the roles of an active app.
Till now we used an endpoint from administration service; but to ensure that we have a clear differenciation of the endpoints and services, we decided to create a own endpoint inside the app services.

Endpoint: /api/apps/{appId}/roles
Method: `GET``

Optional parameter: languagetag

Response Body

[
  {
    "role": "string",
    "descriptions": [
      {
        "languageCode": "string",
        "description": "string"
      }
    ]
  }
]

Validation: only active apps should be callable.

The endpoint provides requesters an overview of available app roles of active apps.

@jjeroch jjeroch added the bug Something isn't working label Mar 19, 2024
@jjeroch jjeroch added this to Portal Mar 19, 2024
@jjeroch jjeroch moved this to NEW USER REQUEST in Portal Mar 19, 2024
@lavanya-bmw
Copy link

lavanya-bmw commented Mar 20, 2024

While adding roles to the active apps, if the api response for GET: /api/administration/user/owncompany/roles/apps/${appId}is [] and tried to add additional roles via POST:/api/apps/AppChange/${appId}/role/activeapp`, the post gets successful. Now, when GET api is called again, there should be roles available, but instead GET call responds with empty([]).

Tested in dev for appId: a376f2c7-c5c9-46f6-96c8-4bafee3c2183

@jjeroch jjeroch moved this from NEW USER REQUEST to BACKLOG in Portal Mar 20, 2024
@VPrasannaK94 VPrasannaK94 moved this from BACKLOG to IN PROGRESS in Portal Apr 1, 2024
@VPrasannaK94 VPrasannaK94 moved this from IN PROGRESS to BACKLOG in Portal Apr 3, 2024
VPrasannaK94 added a commit to catenax-ng/tx-portal-backend that referenced this issue Apr 11, 2024
@VPrasannaK94
Copy link
Contributor

As discussed with @jjeroch created an endpoint GET: /api/apps/AppChange/{appId}/roles to fetch the active app userRoles details.

@ntruchsess ntruchsess linked a pull request Apr 11, 2024 that will close this issue
6 tasks
ntruchsess pushed a commit that referenced this issue Apr 11, 2024
* create endpoint to fetch activeAppRoleDetails
Ref : #573
---------
Co-authored-by: Norbert Truchsess <[email protected]>
@jjeroch jjeroch moved this from BACKLOG to IN PROGRESS in Portal Apr 11, 2024
@VPrasannaK94
Copy link
Contributor

SucessFully Tested in dev

@VPrasannaK94 VPrasannaK94 moved this from IN PROGRESS to IN REVIEW in Portal Apr 16, 2024
@jjeroch jjeroch moved this from IN REVIEW to USER READY in Portal May 2, 2024
@msinamci msinamci closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants