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
6271b8c7
Commit
6271b8c7
authored
4 days ago
by
magicfelix
Browse files
Options
Downloads
Patches
Plain Diff
Adapt to permission checks
parent
98fad0e3
Branches
358-adapt-to-managed_by-change
No related tags found
1 merge request
!479
Adapt to core changes
Pipeline
#196550
failed
4 days ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Stage: docker
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/alsijil/schema/extra_marks.py
+3
-0
3 additions, 0 deletions
aleksis/apps/alsijil/schema/extra_marks.py
aleksis/apps/alsijil/schema/participation_status.py
+1
-0
1 addition, 0 deletions
aleksis/apps/alsijil/schema/participation_status.py
with
4 additions
and
0 deletions
aleksis/apps/alsijil/schema/extra_marks.py
+
3
−
0
View file @
6271b8c7
...
...
@@ -29,6 +29,7 @@ class ExtraMarkBatchCreateMutation(BaseBatchCreateMutation):
model
=
ExtraMark
fields
=
(
"
short_name
"
,
"
name
"
,
"
colour_fg
"
,
"
colour_bg
"
,
"
show_in_coursebook
"
)
optional_fields
=
(
"
name
"
,)
permissions
=
(
"
alsijil.create_extramark_rule
"
,)
@classmethod
def
check_permissions
(
cls
,
root
,
info
,
input
):
# noqa
...
...
@@ -40,6 +41,7 @@ class ExtraMarkBatchCreateMutation(BaseBatchCreateMutation):
class
ExtraMarkBatchDeleteMutation
(
BaseBatchDeleteMutation
):
class
Meta
:
model
=
ExtraMark
permissions
=
(
"
alsijil.create_extramark_rule
"
,)
@classmethod
def
check_permissions
(
cls
,
root
,
info
,
input
):
# noqa
...
...
@@ -52,6 +54,7 @@ class ExtraMarkBatchPatchMutation(BaseBatchPatchMutation):
class
Meta
:
model
=
ExtraMark
fields
=
(
"
id
"
,
"
short_name
"
,
"
name
"
,
"
colour_fg
"
,
"
colour_bg
"
,
"
show_in_coursebook
"
)
permissions
=
(
"
alsijil.create_extramark_rule
"
,)
@classmethod
def
check_permissions
(
cls
,
root
,
info
,
input
):
# noqa
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/schema/participation_status.py
+
1
−
0
View file @
6271b8c7
...
...
@@ -86,6 +86,7 @@ class ParticipationStatusBatchPatchMutation(BaseBatchPatchMutation):
"
tardiness
"
,
)
# Only the reason and tardiness can be updated after creation
return_field_name
=
"
participationStatuses
"
permissions
=
(
"
alsijil.edit_participation_status_for_documentation_with_time_range_rule
"
,)
@classmethod
def
check_permissions
(
cls
,
root
,
info
,
input
,
*
args
,
**
kwargs
):
# noqa: A002
...
...
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