Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Chronos
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-Chronos
Commits
c4ccb64d
Commit
c4ccb64d
authored
3 years ago
by
Hangzhi Yu
Browse files
Options
Downloads
Patches
Plain Diff
Add docstrings
parent
ebd013b7
No related branches found
No related tags found
1 merge request
!113
Resolve "Review permissions"
Pipeline
#10537
passed
3 years ago
Stage: test
Stage: build
Stage: publish
Stage: docker
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/chronos/util/chronos_helpers.py
+3
-0
3 additions, 0 deletions
aleksis/apps/chronos/util/chronos_helpers.py
with
3 additions
and
0 deletions
aleksis/apps/chronos/util/chronos_helpers.py
+
3
−
0
View file @
c4ccb64d
...
...
@@ -47,6 +47,7 @@ def get_substitution_by_id(request: HttpRequest, id_: int, week: int):
def
get_teachers
(
user
:
User
):
"""
Get the teachers whose timetables are allowed to be seen by current user.
"""
checker
=
ObjectPermissionChecker
(
user
)
teachers
=
(
...
...
@@ -70,6 +71,7 @@ def get_teachers(user: User):
def
get_classes
(
user
:
User
):
"""
Get the classes whose timetables are allowed to be seen by current user.
"""
checker
=
ObjectPermissionChecker
(
user
)
classes
=
(
...
...
@@ -103,6 +105,7 @@ def get_classes(user: User):
def
get_rooms
(
user
:
User
):
"""
Get the rooms whose timetables are allowed to be seen by current user.
"""
checker
=
ObjectPermissionChecker
(
user
)
rooms
=
(
...
...
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