Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Official
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
0inraMfauri
Official
Commits
6a6c29fb
Commit
6a6c29fb
authored
3 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Plain Diff
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
!69
parents
2b02d17b
16c8614b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
aleksis/apps/untis/menus.py
+2
-2
2 additions, 2 deletions
aleksis/apps/untis/menus.py
aleksis/apps/untis/rules.py
+2
-2
2 additions, 2 deletions
aleksis/apps/untis/rules.py
aleksis/apps/untis/views.py
+1
-1
1 addition, 1 deletion
aleksis/apps/untis/views.py
with
5 additions
and
5 deletions
aleksis/apps/untis/menus.py
+
2
−
2
View file @
6a6c29fb
...
...
@@ -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
"
,
),
],
},
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/untis/rules.py
+
2
−
2
View file @
6a6c29fb
...
...
@@ -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
)
This diff is collapsed.
Click to expand it.
aleksis/apps/untis/views.py
+
1
−
1
View file @
6a6c29fb
...
...
@@ -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
=
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment