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

[bug] has_permission() is buggy and redundant #266

Closed
nemesifier opened this issue Aug 4, 2021 · 0 comments · Fixed by #267
Closed

[bug] has_permission() is buggy and redundant #266

nemesifier opened this issue Aug 4, 2021 · 0 comments · Fixed by #267
Assignees
Labels

Comments

@nemesifier
Copy link
Member

The functionality in this commit b4cb116 was added because a misunderstanding on my side of how the django permission system works.
The permissions are already cached and well handled by django so we don't really need to have those methods, which are buggy and don't work well, I just found out that changin the group of a user on the latest master of the OpenWISP modules causes the menu items to be removed entirely and it's not worth to fix, let's just remove this code and use the default has_perm method of django.

@nemesifier nemesifier added the bug label Aug 4, 2021
@nemesifier nemesifier self-assigned this Aug 4, 2021
nemesifier added a commit that referenced this issue Aug 4, 2021
This code was introduced because of a misunderstanding.
It's not only not necessary but also buggy, better remove it and
use the permission helpers provided by Django.

Closes #266
nemesifier added a commit that referenced this issue Aug 4, 2021
This code was introduced because of a misunderstanding.
It's not only not necessary but also buggy, better remove it and
use the permission helpers provided by Django.

Closes #266
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

1 participant