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

Create function to validate PUT /user request body data #97

Closed
7 tasks done
isabelcosta opened this issue Jul 18, 2018 · 2 comments
Closed
7 tasks done

Create function to validate PUT /user request body data #97

isabelcosta opened this issue Jul 18, 2018 · 2 comments
Assignees
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. Program: GSOC Related to work completed during the Google Summer of Code Program. Type: Enhancement New feature or request.

Comments

@isabelcosta
Copy link
Member

isabelcosta commented Jul 18, 2018

Description

As a developer,
I need restrict character limit on fields that can be updated,
so that I can protect the backend from trying to save invalid data.

Solves bug reported on issue #96

Acceptance Criteria

Update

  • Add a validation function to app/api/validations/user.py file
  • Add tests to prove that the validation function is working properly. The test file can be called test_validation_update_profile.py inside folder tests/users
  • Use this validation function in MyUserProfile class, funtion put() from file app/api/resources/user.py to validate the request data sent by the client is being verified
  • Warning! make sure to strip strings before checking for the length!! fix this in the registration validation and add tests!

Definition of Done

  • All of the required items are completed.
  • PR should be sent to the gsoc18-code branch.
  • Approval by 1 mentor.

Estimation

4 hours

@isabelcosta isabelcosta added Category: Coding Changes to code base or refactored code that doesn't fix a bug. Priority: HIGH Program: GSOC Related to work completed during the Google Summer of Code Program. Type: Enhancement New feature or request. labels Jul 18, 2018
@isabelcosta
Copy link
Member Author

@sviho do you want to take on this issue and try to solve this? You can see in the Update section what you need to do. If you feel comfortable with python and this issue let me know, otherwise I can take of this.

@isabelcosta isabelcosta self-assigned this Jul 18, 2018
@Dilu9218
Copy link
Contributor

@isabelcosta you can do it. approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. Program: GSOC Related to work completed during the Google Summer of Code Program. Type: Enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants