Fix usage of user.has_perm with object permissions #143

Closed
opened 2021-02-28 19:45:59 +01:00 by hansegucker · 3 comments
hansegucker commented 2021-02-28 19:45:59 +01:00 (Migrated from edugit.org)

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).
hansegucker commented 2021-03-10 11:42:18 +01:00 (Migrated from edugit.org)

created merge request !547 to address this issue

created merge request !547 to address this issue
hansegucker commented 2021-03-10 11:42:19 +01:00 (Migrated from edugit.org)

mentioned in merge request !547

mentioned in merge request !547
nik (Migrated from edugit.org) closed this issue 2021-03-11 12:25:14 +01:00
nik commented 2021-03-11 12:25:17 +01:00 (Migrated from edugit.org)

mentioned in commit dfaca38593

mentioned in commit dfaca38593a8a829bb183cf33ce561a5cfbe5570
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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.