Evalai: Restrict the update profile API Endpoint from updating username

Created on 23 Mar 2017  路  16Comments  路  Source: Cloud-CV/EvalAI

Currently, django-rest-auth provides the functionality to update the username with the update profile API Endpoint. We want to restrict this since we don't want a user to update his username once he has created his account.

For more details about the API endpoint, look at http://django-rest-auth.readthedocs.io/en/latest/api_endpoints.html#basic

GSOC-2019 backend critical medium-difficulty

All 16 comments

Related to #863

@deshraj can I take it up?

@yadavankit Sure. :)

@deshraj @yadavankit Is anyone still working on this or can I take this one?

@mayank-agarwal-96 Yeah, you can work on it. :)

@deshraj ohh, I just forgot this issue... my bad 馃槄 @mayank-agarwal-96 yeah go on bro...you can take this up :)

Hi, I'm a bit new to restful services using django, and I guess that with a bit of learning I could solve this issue, where would be the best place to start using rest for evalai?

Hey @isht3 Django REST Framework Documentation would be a good place to start learning about how REST is implemented in EvalAI.

@taranjeet @yadavankit I'm currently in the process of learning django REST, I'd like to inform that I'll be back for bigger contributions to CloudCV after I'm done with a personal project of mine.

@isht3 Sounds good. Thanks for informing. :)

@deshraj Can I start working on this? :)

yes sure. Assigning this to you.

Hi, @deshraj @RishabhJain2018 To update the username after creation of account we should do a PUT request to /api/auth/user/, right? I'd like to test this for a bit, would it be best to do it through cURL or drf-docs?

@isht3 Please refer here for the command https://pvcarrera.github.io/general/2015/03/18/curl.html. Moreover , you can usePostmanclient for the same. Let me know if you still have doubts.

@RishabhJain2018 I'll look into it! :smile:

@RishabhJain2018 Hi, I have analysed the issue. Since only the PUT or PATCH request to the /auth/user/ which contains username should be restricted, it would require writing a view to check the parameters passed during a PUT or PATCH request, if it doesn't edit the username then passes then pass it onto rest_auth, right?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HargovindArora picture HargovindArora  路  4Comments

deshraj picture deshraj  路  6Comments

vivektalwar13071999 picture vivektalwar13071999  路  3Comments

RishabhJain2018 picture RishabhJain2018  路  5Comments

Ayukha picture Ayukha  路  5Comments