Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix our use of PermissionMixin #1153

Merged
merged 4 commits into from
Aug 26, 2020
Merged

Fix our use of PermissionMixin #1153

merged 4 commits into from
Aug 26, 2020

Conversation

neilmb
Copy link
Member

@neilmb neilmb commented Aug 21, 2020

Description

In #1138 @Jkrzy noticed that we were mis-using the PermissionMixin class with no permission_classes which restricts nothing. This corrects that by using LoginRequiredMixin in those cases and prevents it from happening again by making it an exception to use PermissionMixin without defining the permission_classes attribute.

Additional information

We could go further with this and replace all of the correct uses of PermissionMixin with permission_classes = (IsAuthenticated, ) by LoginRequiredMixin but I haven't done that here. I'm willing though if people would prefer it.

@Jkrzy
Copy link
Contributor

Jkrzy commented Aug 26, 2020

Thanks @neilmb, this is nice move in the right direction. I don't think we need to address PermissionMixin with permission_classes = (IsAuthenticated, ) in this PR.

@Jkrzy Jkrzy merged commit 79b2afb into main Aug 26, 2020
@Jkrzy Jkrzy deleted the nmb/1138-permissions branch August 26, 2020 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants