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

Propagate request context to handlers #411

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

Woazboat
Copy link
Contributor

Make context information about the request (user id, roles, ...) available in change handlers.
Unblocks future features like #409 (comment)

@mmd-osm
Copy link
Collaborator

mmd-osm commented Jun 18, 2024

Thanks, this looks good even outside the context of #409. Will probably merge this PR later tonight.

@mmd-osm
Copy link
Collaborator

mmd-osm commented Jun 19, 2024

As mentioned in #409 (comment), we're using the same database function approach as before with the changeset rate limit. For this reason, this pull request would no longer be a prerequisite for making progress on the topic.

I still find the general idea really useful, but would likely merge it only after we have released the next 0.9.x version to keep the amount of code to be backported as small as possible. I hope that's fine for now.

@mmd-osm
Copy link
Collaborator

mmd-osm commented Jun 26, 2024

OAuth 1.0a / Basic auth retirement is now scheduled for July 1st link. That means backporting will no longer be a concern in the near future.

@mmd-osm
Copy link
Collaborator

mmd-osm commented Jul 4, 2024

Thanks, looks good to me now!

@mmd-osm mmd-osm merged commit 9e3dee4 into zerebubuth:master Jul 4, 2024
6 checks passed
@mmd-osm
Copy link
Collaborator

mmd-osm commented Jul 6, 2024

I did some further refactoring in #415. Most notably, I switched back from RequestContext to request for non-HTTP POST/PUT methods, since we're not using any of the non-request fields. Previously, this looked a bit too redundant to me.

OTOH, I have replaced the input parameters in validate_user_db_update_permission method by RequestContext, which also happens to be inside the POST/PUT code path.

Other changes are listed in the PR. I hope this makes sense.

@mmd-osm mmd-osm added this to the v2.0.0 milestone Aug 6, 2024
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

Successfully merging this pull request may close these issues.

2 participants