Skip to content
Snippets Groups Projects
Verified Commit fbbb6020 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix permission names and core/alsijil relation

parent 93203b44
No related branches found
No related tags found
1 merge request!49Resolve "Add rules and permissions"
Pipeline #2763 passed
......@@ -100,6 +100,10 @@ Group.add_permission(
"view_week_class_register_group",
_("Can view week overview of group class register"),
)
Group.add_permission(
"view_lesson_class_register_group",
_("Can view lesson overview of group class register"),
)
Group.add_permission(
"view_personalnote_group", _("Can view all personal notes of a group")
)
......
......@@ -24,7 +24,7 @@ view_lesson_predicate = has_person & (
| is_lesson_teacher
| is_lesson_participant
| is_lesson_parent_group_owner
| has_lesson_group_object_perm("alsijil.view_lesson")
| has_lesson_group_object_perm("core.view_week_class_register_group")
)
add_perm("alsijil.view_lesson", view_lesson_predicate)
......@@ -76,7 +76,7 @@ add_perm("alsijil.view_week", view_week_predicate)
# View week personal notes
view_week_personal_notes_predicate = has_person & (
has_global_perm("alsijil.view_personalnote")
| has_object_perm("alsijil.view_personalnote")
| has_object_perm("core.view_personalnote_group")
| is_group_owner
)
add_perm("alsijil.view_week_personalnote", view_week_personal_notes_predicate)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment