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
7090ef78
Verified
Commit
7090ef78
authored
5 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Allow superusers to create lesson documentations in the future.
parent
f056c8bb
No related branches found
No related tags found
1 merge request
!21
Allow superusers to create lesson documentations in the future.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
biscuit/apps/alsijil/views.py
+1
-1
1 addition, 1 deletion
biscuit/apps/alsijil/views.py
with
1 addition
and
1 deletion
biscuit/apps/alsijil/views.py
+
1
−
1
View file @
7090ef78
...
@@ -35,7 +35,7 @@ def lesson(request: HttpRequest, year: Optional[int] = None, week: Optional[int]
...
@@ -35,7 +35,7 @@ def lesson(request: HttpRequest, year: Optional[int] = None, week: Optional[int]
else
:
else
:
raise
Http404
(
_
(
'
You either selected an invalid lesson or there is currently no lesson in progress.
'
))
raise
Http404
(
_
(
'
You either selected an invalid lesson or there is currently no lesson in progress.
'
))
if
datetime
.
combine
(
wanted_week
[
lesson_period
.
period
.
weekday
-
1
],
lesson_period
.
period
.
time_start
)
>
datetime
.
now
():
if
datetime
.
combine
(
wanted_week
[
lesson_period
.
period
.
weekday
-
1
],
lesson_period
.
period
.
time_start
)
>
datetime
.
now
()
and
not
request
.
user
.
is_superuser
:
raise
PermissionDenied
(
_
(
'
You are not allowed to create a lesson documentation for a lesson in the future.
'
))
raise
PermissionDenied
(
_
(
'
You are not allowed to create a lesson documentation for a lesson in the future.
'
))
context
[
'
lesson_period
'
]
=
lesson_period
context
[
'
lesson_period
'
]
=
lesson_period
...
...
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