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

Middlewares per endpoint #14

Open
kruczekrobert opened this issue Nov 17, 2022 · 3 comments
Open

Middlewares per endpoint #14

kruczekrobert opened this issue Nov 17, 2022 · 3 comments

Comments

@kruczekrobert
Copy link
Collaborator

It would be useful to add middleware per endpoint

@meteran
Copy link
Owner

meteran commented Jan 12, 2023

Could you give some use case example?

@kruczekrobert
Copy link
Collaborator Author

kruczekrobert commented Jan 12, 2023

Well, it would be extremely useful and convenient for middleware supporting object-level permissions.

e.g.

having an endpoint for get a resource, I would like to determine that Read permissions are enough.

GET(":id", someHandler, ObjectPermissionMiddleware(Read))

but it has to require a Write permission to edit it

PUT(":id", someHandler, ObjectPermissionMiddleware(Write))

@busf4ctor
Copy link

Do we have any progress on this? It's a possible fix for #32

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

No branches or pull requests

3 participants