IIT-BHU-InstiApp / lite-hai-backend

https://lite-hai.copsiitbhu.co.in/
13 stars 20 forks source link

Changed access permissions for CouncilDetails and ClubDetails endpoint #48

Closed Vikhyath08 closed 4 years ago

Vikhyath08 commented 4 years ago

Added a new Permission class (AllowCouncilHead) which only allows Council Heads to access methods which are not SAFE_METHODS.

krashish8 commented 4 years ago

@Vikhyath08 I think it would be better to replace permissions.AllowAny with AllowCouncilHead, instead of adding the extra permission with AllowAny permission. It works good, however!

Also, there is a similar permission issue with the ClubDetails endpoint, so you can make the changes there too.

krashish8 commented 4 years ago

@nishantwrp Are the CircleCI lint-checks disabled?

Vikhyath08 commented 4 years ago

Oof. Yes. No idea what I was thinking there.

Yes, I'll make the changes in the ClubDetails as well

Vikhyath08 commented 4 years ago

Added permission for the ClubDetailView endpoint, similar to the CouncilDetailView permission. Also fixed an issue with the previous PR that a council head was able to edit the details of other councils as well.

nishantwrp commented 4 years ago

@Vikhyath08 merge this branch from the latest master. So, the lint checks can run.

krashish8 commented 4 years ago

@Vikhyath08 Everything looks good. Just merge your branch with the latest master one last time, so that lint checks would run, and fix the lint-check errors if any.

krashish8 commented 4 years ago

@Vikhyath08 I mean, the master branch of this repository has updated, to include the files for running lint checks. So, merge your branch with the updated master branch, so that link checks will run. We can merge this PR only when all the checks pass.

In case you don't know how to merge with the updated master branch, follow these steps:

git checkout modify-council-permissions    # Ensure that you are in this branch
git remote add upstream https://github.com/IIT-BHU-InstiApp/workshops-app-backend
git fetch upstream
git merge upstream/master
git push origin modify-council-permissions

Also, fix the lint check errors, if any.