Evalai: Use IsChallengeCreator decorator in Challenge Phase detail API Endpoint

Created on 27 Mar 2017  路  21Comments  路  Source: Cloud-CV/EvalAI

Currently, the check for if the requesting user is Creator of Challenge or not is missing from the challenge_phase_detail API View. We would like to add the IsChallengeCreator decorator (https://github.com/Cloud-CV/EvalAI/blob/master/apps/challenges/permissions.py#L6) to this endpoint.

Also, please add test cases after making the above changes.

GSOC-2019 backend critical easy_to_fix enhancement

Most helpful comment

@varunagrawal, @Obtin Yes, I already started working on this. I was going through how to work on decorators, that's why this was taking time. I'll finish this by sometime next week. :smile:

All 21 comments

@AnshulBasia Sure. :)

@deshraj can you tell me what exactly do we do after the check?

@Shashi456 I think @AnshulBasia is already working on this. Feel free to pick any other unassigned issue. :)

@deshraj what about #863

@AnshulBasia any updates on this? If you're busy, I can take it forward.

@varunagrawal Sorry,I am done but testing is yet to be done. I got stuck with my assignments. Please take it forward. Thanks.

Sure thing mate @AnshulBasia. Thanks for letting us know. :)

@deshraj please assign this to me.

Sure.

@deshraj Can you please tell me what we need to do exactly.

@modestlearner: This is quite critical and I would like to fix it myself. Can you please pick some other issue?

@deshraj Sure

@deshraj Is this solved?

Hi @isht3, @deshraj has been on vacation the past few weeks and should be back today. Expect this to be solved sometime this week. :)

@varunagrawal Hope he had a good time, I'm going on vacation today! lol.

@isht3: no, this issue is not solved yet. Please feel free to take this up.

@isht3 Deshraj has given you the go ahead. If you don't have the time to work on this, we understand, and we can assign this to @Obtin

@varunagrawal, @Obtin Yes, I already started working on this. I was going through how to work on decorators, that's why this was taking time. I'll finish this by sometime next week. :smile:

@deshraj The IsChallengeCreator Class in permissions.py and its use-cases should be completely replaced with the IsChallengeCreator decorator, yes?

@isht3 no that class is required in the permissions since other API endpoints depend on it. You should just be able to add that permission class to the @permission_classes decorator and have it work. The crucial aspect of this issue are the test cases which need to ensure all corner cases are handled.

I know this seems like very little work technically, but then again, this is an easy issue to get people started with CloudCV contribution. :)

@varunagrawal I think the changes are already added to the permission_classes, I'll get started with writing the tests. Thank you for clearing it up!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vivektalwar13071999 picture vivektalwar13071999  路  3Comments

Arun-Jain picture Arun-Jain  路  6Comments

Ayukha picture Ayukha  路  5Comments

HargovindArora picture HargovindArora  路  4Comments

Ayukha picture Ayukha  路  5Comments