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

Rename rules

parent 2b02d17b
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ MENUS = {
"name": _("Untis XML import"),
"url": "untis_xml_import",
"validators": [
("aleksis.core.util.predicates.permission_validator", "untis.do_xml_import",),
("aleksis.core.util.predicates.permission_validator", "untis.do_xml_import_rule",),
],
},
{
......@@ -15,7 +15,7 @@ MENUS = {
"validators": [
(
"aleksis.core.util.predicates.permission_validator",
"untis.assign_subjects_to_groups",
"untis.assign_subjects_to_groups_rule",
),
],
},
......
......@@ -4,11 +4,11 @@ from aleksis.core.util.predicates import has_global_perm, has_person
# Do XML import
do_xml_import_predicate = has_person & has_global_perm("untis.do_xml_import")
add_perm("untis.do_xml_import", do_xml_import_predicate)
add_perm("untis.do_xml_import_rule", do_xml_import_predicate)
# Do XML import
assign_subjects_to_groups_predicate = has_person & has_global_perm(
"untis.assign_subjects_to_groups"
)
add_perm("untis.assign_subjects_to_groups", assign_subjects_to_groups_predicate)
add_perm("untis.assign_subjects_to_groups_rule", assign_subjects_to_groups_predicate)
......@@ -7,7 +7,7 @@ from .forms import UntisUploadForm
from .util.xml.xml import untis_import_xml
@permission_required("untis.do_xml_import")
@permission_required("untis.do_xml_import_rule")
def xml_import(request: HttpRequest) -> HttpResponse:
context = {}
......
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