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

The Second Iteration: Cancelling orders (a minimal scope-based authorization) #1999

Closed
nabdelgadir opened this issue Nov 8, 2018 · 2 comments

Comments

@nabdelgadir
Copy link
Contributor

nabdelgadir commented Nov 8, 2018

Description

Step 4 from #1035 (comment).

Let's add a new Order property called state with the following values: new (set for all newly created orders), delivered, canceled. Implement a new REST API for cancelling orders: POST /orders/{orderId}/cancel.

Let's define two kinds of users in our Shopping app:

  • customers can see and cancel their own orders only (scope: orders:my)
  • admins can see and cancel all orders in the system (scope: orders:all)

As part of this iteration, we need to figure out how to implement scopes, how to decorate controller methods like cancel to enforce a certain scope, but also how to push the access restriction down to repository level, so that a request to list all orders returns only orders accessible to the current user.

Ideally, there should be a documentation and/or a blog-post and/or a reference implementation to make it easier for LB4 users to implement similar functionality in their project.

Previous step: #1998
Next step: #2000

@stale
Copy link

stale bot commented Feb 24, 2020

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

@stale stale bot added the stale label Feb 24, 2020
@stale
Copy link

stale bot commented Mar 26, 2020

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale stale bot closed this as completed Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants