Fix usage of user.has_perm with object permissions #143

Closed
opened 2021-02-28 19:45:59 +01:00 by hansegucker · 3 comments
Owner

When using user.has_perm() with an object as argument, the permission must have the same origin as the related model. Otherwise, Django throws an exception.

But request.user.has_perm("alsijil.view_assigned_grouproles", register_object) makes use of a permission from Alsijil and a model from Chronos (LessonPeriod, Event, ExtraLesson).

When using user.has_perm() with an object as argument, the permission must have the same origin as the related model. Otherwise, Django throws an exception. But `request.user.has_perm("alsijil.view_assigned_grouproles", register_object)` makes use of a permission from Alsijil and a model from Chronos (LessonPeriod, Event, ExtraLesson).
Author
Owner

created merge request !547 to address this issue

created merge request !547 to address this issue
Author
Owner

mentioned in merge request !547

mentioned in merge request !547
nik closed this issue 2021-03-11 12:25:14 +01:00
Owner

mentioned in commit dfaca38593

mentioned in commit dfaca38593a8a829bb183cf33ce561a5cfbe5570
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
aleksis/AlekSIS-App-Alsijil#143
No description provided.