-
Notifications
You must be signed in to change notification settings - Fork 27
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
Refactor user_profile to use blueprints #2067
base: master
Are you sure you want to change the base?
Conversation
c3cdf8e
to
4ce2135
Compare
Test is failing on build. I don't believe it failed on desktop. Investigating why... |
Confirmed make debug-test passes locally. |
4ce2135
to
7fcf974
Compare
7fcf974
to
8fd9c30
Compare
8fd9c30
to
5cae080
Compare
The original issue was that MySQL does not like " around column names but SQLite is happy with them (thus the failure on deploy test instead of desktop test) WRT the issue link: yeah that was wrong. I fixed it in the commit, but that didn't auto-update the PR. Thank you for fixing. Now the test are failing on policy tests. Possibly related to MySQL as well, but less obvious. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikesmit, thanks for these changes. They obviously solve a major issue within the existing API. I had one suggestion, but it's non-blocking. Otherwise, I'd love to see this merged once tests pass.
from werkzeug.exceptions import BadRequest, NotFound | ||
|
||
user_profile_bp = Blueprint("user_profile", __name__) | ||
user_service = UserService() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion, non-blocking: Rename this to UserProfileService
(or something similar)
We also have a user_policy
table that should have its own service in the future, and I wouldn't be surprised if we stored more user-related data in the future. I think it might be advantageous to make the service name more descriptive.
fixes #1989, fixes #2059
This migrates the code for the user profile resource to use blueprints.
It also fixes an issue where the PUT operation allowed malicious injection attacks on our database.