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

Ability for App or Service Provider to Decline the Subscription request #1140

Open
5 tasks done
tfjanjua opened this issue Nov 11, 2024 · 0 comments
Open
5 tasks done
Assignees
Labels
enhancement New feature or request

Comments

@tfjanjua
Copy link
Contributor

tfjanjua commented Nov 11, 2024

Description

We have apps and service’s subscriptions which we want to “Decline” by App/Service Provider or Admin type of users. Currently we only have Activate and Deactivate Subscription functionality by App/Service Provider type of users.

Acceptance Criteria

  • App/Service Provider or Admin type of users could “Decline” the subscription request, made by the users of same company or another company.
  • App/Service Provider or Admin type of users wouldn’t be able to Re-Activate the declined subscription request.
  • The declination can only take place after the subscription request and before the activation of the subscription request.
  • Subscription request would just simply be removed from the list of subscription requests, after the declination.
  • Frontend may ask for the confirmation of declination before sending request to backend.
  • This declination would remove the subscription request but requester (subscriber) would still have the possibility to subscribe the same App/Service from the same, App/Service Details page.
  • An email is sent to the requester to confirm the subscription was declined.

Tasks

  • Backend would introduce a new API to Decline the subscription request.
  • This new API would be part of both of the entities (App and Service).
  • This new API would have same role/right as Activating the App/Service Subscription Request by the Provider or Admin type of users.
  • API would just simply delete the record of the subscription request from the database so, there will be no extra data would be existing into the database and there will be no change into the listing of subscription request API.
  • API would send the notification email to the requester regarding the declination.

Corresponding IAM Ticket To Add Role decline_subscription

eclipse-tractusx/portal-iam#232

Test Cases

Test Case 1: Verify to Decline a pending subscription request of my own offer

  • Lets have 2 companies (e.g. C1 and C2).
  • Login with C1 and navigate to https://portal.example.com/appReleaseProcess.
  • Release an App (e.g: A1) and navigate to https://portal.example.com/adminboard and approve it.
  • Logout C1 and re-login with C2
  • Navigate to App Marketplace and search for A1 and subscribe it.
  • Logout C2 and re-login with C1 and navigate to https://portal.example.com/appSubscription
  • Search for recent app subscription request from C2 and Decline it.
  • Result: Successful

Test Case 2: Verify to Decline an already approved subscription request of my own offer

  • Lets have 2 companies (e.g. C1 and C2).
  • Login with C1 and navigate to https://portal.example.com/appReleaseProcess.
  • Release an App (e.g: A1) and navigate to https://portal.example.com/adminboard and approve it.
  • Logout C1 and re-login with C2
  • Navigate to App Marketplace and search for A1 and subscribe it.
  • Logout C2 and re-login with C1 and navigate to https://portal.example.com/appSubscription
  • Search for recent app subscription request from C2 and try to Decline it.
  • Result: Error because subscription request has already been Approved.

Test Case 3: Verify to Decline an already declined subscription request of my own offer

  • Lets have 2 companies (e.g. C1 and C2).
  • Login with C1 and navigate to https://portal.example.com/appReleaseProcess.
  • Release an App (e.g: A1) and navigate to https://portal.example.com/adminboard and approve it.
  • Logout C1 and re-login with C2
  • Navigate to App Marketplace and search for A1 and subscribe it.
  • Logout C2 and re-login with C1 and navigate to https://portal.example.com/appSubscription
  • Search for recent app subscription request from C2 and try to Decline it.
  • Result: Subscription request shouldn't be available for any further action because its already declined.

Test Case 4: Verify to Decline a subscription request of someone else's offer

  • Lets have 2 companies (e.g. C1 and C2).
  • Login with C1 and navigate to https://portal.example.com/appReleaseProcess.
  • Release an App (e.g: A1) and navigate to https://portal.example.com/adminboard and approve it.
  • Logout C1 and re-login with C2
  • Navigate to App Marketplace and search for A1 and subscribe it.
  • Logout C2 and re-login with C1 and navigate to https://portal.example.com/appSubscription
  • Search for recent app subscription request from C2 and try to Decline it.
  • Result: Subscription request shouldn't be available for any further action because its wouldnt be my own offer's subscription request.
@tfjanjua tfjanjua added the enhancement New feature or request label Nov 11, 2024
@tfjanjua tfjanjua self-assigned this Nov 11, 2024
@tfjanjua tfjanjua added this to Portal Nov 11, 2024
@github-project-automation github-project-automation bot moved this to NEW USER REQUEST in Portal Nov 11, 2024
@tfjanjua tfjanjua moved this from NEW USER REQUEST to IN PROGRESS in Portal Nov 21, 2024
tfjanjua added a commit to tfjanjua/portal-backend that referenced this issue Nov 21, 2024
…line the Subscription request

Ref: eclipse-tractusx#1140

- /api/apps/subscription/{subscriptionId}/decline
- /api/services/subscription/{subscriptionId}/decline
@tfjanjua tfjanjua moved this from IN PROGRESS to IN REVIEW in Portal Nov 22, 2024
tfjanjua added a commit to tfjanjua/portal-backend that referenced this issue Dec 23, 2024
…line the Subscription request

Ref: eclipse-tractusx#1140

- /api/apps/subscription/{subscriptionId}/decline
- /api/services/subscription/{subscriptionId}/decline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: IN REVIEW
Development

No branches or pull requests

1 participant