Closed Vikhyath08 closed 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.
@nishantwrp Are the CircleCI lint-checks disabled?
Oof. Yes. No idea what I was thinking there.
Yes, I'll make the changes in the ClubDetails as well
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.
@Vikhyath08 merge this branch from the latest master
. So, the lint checks can run.
@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.
@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.
Added a new Permission class (
AllowCouncilHead
) which only allows Council Heads to access methods which are notSAFE_METHODS
.