Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
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
Container Registry
Model registry
Operate
Environments
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
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
0319cbcf
Verified
Commit
0319cbcf
authored
4 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Fix register_absence rules (allow only primary group owners to register absences)
parent
a5429af4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!49
Resolve "Add rules and permissions"
Pipeline
#3523
passed
4 years ago
Stage: test
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/alsijil/forms.py
+1
-1
1 addition, 1 deletion
aleksis/apps/alsijil/forms.py
aleksis/apps/alsijil/rules.py
+1
-2
1 addition, 2 deletions
aleksis/apps/alsijil/rules.py
with
2 additions
and
3 deletions
aleksis/apps/alsijil/forms.py
+
1
−
1
View file @
0319cbcf
...
...
@@ -150,7 +150,7 @@ class RegisterAbsenceForm(forms.Form):
self
.
request
.
user
,
"
core.register_absence_person
"
,
Person
)
.
union
(
Person
.
objects
.
filter
(
member_of
__owners
=
self
.
request
.
user
.
person
)
Person
.
objects
.
filter
(
primary_group
__owners
=
self
.
request
.
user
.
person
)
)
.
union
(
Person
.
objects
.
filter
(
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/rules.py
+
1
−
2
View file @
0319cbcf
...
...
@@ -52,7 +52,6 @@ edit_lesson_personal_note_predicate = has_person & (
has_global_perm
(
"
alsijil.change_personalnote
"
)
|
has_lesson_group_object_perm
(
"
core.edit_personalnote_group
"
)
|
is_lesson_teacher
|
is_lesson_parent_group_owner
)
add_perm
(
"
alsijil.edit_lesson_personalnote
"
,
edit_lesson_personal_note_predicate
)
...
...
@@ -127,7 +126,7 @@ register_absence_predicate = has_person & (
has_global_perm
(
"
alsijil.register_absence
"
)
|
has_person_group_object_perm
(
"
core.register_absence_group
"
)
|
has_object_perm
(
"
core.register_absence_person
"
)
|
is_person_group_owner
|
is_person_
primary_
group_owner
)
add_perm
(
"
alsijil.register_absence
"
,
register_absence_predicate
)
...
...
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