Cloud-CV / EvalAI

:cloud: :rocket: :bar_chart: :chart_with_upwards_trend: Evaluating state of the art in AI
https://eval.ai
Other
1.73k stars 774 forks source link

Host Deletion function performs no check for the type of Host #2664

Open Kajol-Kumari opened 4 years ago

Kajol-Kumari commented 4 years ago

Bug

Expected behaviour:

Observed behaviour:

Steps to reproduce the problem: After writing controller function for deleting host. Go to Host Team -> Create a new host team -> Add members to it -> Try deleting Admin

Operating System: Ubuntu 18.04

Browser: Google Chrome

ezgif com-video-to-gif (9)

Reference: https://github.com/Cloud-CV/EvalAI/blob/master/apps/hosts/views.py#L204-L206

Suryansh5545 commented 4 years ago

@Kajol-Kumari As you have added this new feature and you know what possibly went wrong would to like to fix it?

Suryansh5545 commented 4 years ago

@Kajol-Kumari The feature isn't merged yet so you can fix this bug in that and close this issue.

Kajol-Kumari commented 4 years ago

@Kajol-Kumari The feature isn't merged yet so you can fix this bug in that and close this issue.

@Suryansh5545 The part of code i have given in reference is already merged. While working on adding deletion feature for host, i found that the codes for deletion is already written but it is not performing any check on the type of user trying to delete a particular host.

Kajol-Kumari commented 4 years ago

@Kajol-Kumari As you have added this new feature and you know what possibly went wrong would to like to fix it?

I am working on it @Suryansh5545

deshraj commented 4 years ago

@Kajol-Kumari we have an updated plan for this.

Kajol-Kumari commented 4 years ago

@Kajol-Kumari we have an updated plan for this.

  • Only person who created the team should be able to delete members from the team and invited members should not have the rights to delete other users in the team. This applies to both participants and hosts team.

Yes @deshraj . This is what i have implemented here. Invited members won't have the privilege to delete any of the members and also the delete icon would not be visible to him/her. Please see the 3rd GIF here