-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Users API: add the update endpoint #2595
Conversation
- Adds deserialization method for usernames (note: still needs trans) - Adds tests for deserializer in test_UserManager.py
- users and admin can now update usernames via the API - adds api tests to update
from galaxy.managers import histories, users | ||
|
||
from .base import BaseTestCase | ||
from base import BaseTestCase |
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.
Please revert to include the dot (for Python3).
👍 |
@@ -736,7 +736,7 @@ class ModelDeserializer( HasAModelManager ): | |||
""" | |||
# TODO:?? a larger question is: which should be first? Deserialize then validate - or - validate then deserialize? | |||
|
|||
def __init__( self, app, **kwargs ): | |||
def __init__( self, app, validator=None, **kwargs ): |
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.
The new validator parameter does not seem to be used, is it for future functionalities?
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.
Future composition:
https://github.com/galaxyproject/galaxy/pull/2595/files#diff-d9bd7857711700c7d77c35956699096dR306
Up to this point ModelValidator was enough.
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.
Thanks @carlfeberhard!
Looks good to me. |
Implements update for the users API. Currently only username is deserialized but it should be easier to add more now.
The user deserializer could be improved in the future by bypassing
validate_user_input
and removing the need to passtrans
for the session.Should close: #1992