Skip to content
Snippets Groups Projects
Commit 6a6c29fb authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch '24-rename-rules-to-allow-differentiation-from-permissions' into 'master'

Resolve "Rename rules to allow differentiation from permissions"

Closes #24

See merge request AlekSIS/official/AlekSIS-App-Untis!69
parents 2b02d17b 16c8614b
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ MENUS = { ...@@ -6,7 +6,7 @@ MENUS = {
"name": _("Untis XML import"), "name": _("Untis XML import"),
"url": "untis_xml_import", "url": "untis_xml_import",
"validators": [ "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 = { ...@@ -15,7 +15,7 @@ MENUS = {
"validators": [ "validators": [
( (
"aleksis.core.util.predicates.permission_validator", "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 ...@@ -4,11 +4,11 @@ from aleksis.core.util.predicates import has_global_perm, has_person
# Do XML import # Do XML import
do_xml_import_predicate = has_person & has_global_perm("untis.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 # Do XML import
assign_subjects_to_groups_predicate = has_person & has_global_perm( assign_subjects_to_groups_predicate = has_person & has_global_perm(
"untis.assign_subjects_to_groups" "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 ...@@ -7,7 +7,7 @@ from .forms import UntisUploadForm
from .util.xml.xml import untis_import_xml 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: def xml_import(request: HttpRequest) -> HttpResponse:
context = {} 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