Skip to content
Snippets Groups Projects
Commit 6531ffcc authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Rename permission

parent dcde9e47
No related branches found
No related tags found
1 merge request!329Introduce substitution to do list
Pipeline #193180 failed
...@@ -55,7 +55,7 @@ add_substitution_predicate = has_person & ( ...@@ -55,7 +55,7 @@ add_substitution_predicate = has_person & (
| has_global_perm("chronos.add_lessonsubstitution") | has_global_perm("chronos.add_lessonsubstitution")
| has_object_perm("chronos.add_lessonsubstitution") | has_object_perm("chronos.add_lessonsubstitution")
) )
add_perm("chronos.add_substitution_rule", add_substitution_predicate) add_perm("chronos.create_substitution_rule", add_substitution_predicate)
# Edit substition # Edit substition
edit_substitution_predicate = has_person & ( edit_substitution_predicate = has_person & (
......
...@@ -176,7 +176,7 @@ class SubstitutionBatchCreateOrUpdateMutation(graphene.Mutation): ...@@ -176,7 +176,7 @@ class SubstitutionBatchCreateOrUpdateMutation(graphene.Mutation):
amended_lesson_event.timezone amended_lesson_event.timezone
) )
if info.context.user.has_perm("chronos.add_substitution_rule", amended_lesson_event): if info.context.user.has_perm("chronos.create_substitution_rule", amended_lesson_event):
obj = LessonEvent.objects.create( obj = LessonEvent.objects.create(
datetime_start=datetime_start, datetime_start=datetime_start,
datetime_end=datetime_end, datetime_end=datetime_end,
......
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