Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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-Core
Commits
ad3a5f45
Verified
Commit
ad3a5f45
authored
5 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Raise exception.
parent
ea317c6a
No related branches found
No related tags found
1 merge request
!100
Resolve "Dashboard"
Pipeline
#563
failed
5 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/core/views.py
+2
-1
2 additions, 1 deletion
aleksis/core/views.py
with
2 additions
and
1 deletion
aleksis/core/views.py
+
2
−
1
View file @
ad3a5f45
from
typing
import
Optional
from
django.contrib.auth.decorators
import
login_required
from
django.core.exceptions
import
PermissionDenied
from
django.http
import
Http404
,
HttpRequest
,
HttpResponse
from
django.shortcuts
import
get_object_or_404
,
redirect
,
render
from
django.utils.translation
import
ugettext_lazy
as
_
...
...
@@ -264,6 +265,6 @@ def notification_mark_read(request: HttpRequest, id_: int) -> HttpResponse:
notification
.
read
=
True
notification
.
save
()
else
:
messages
.
danger
(
request
,
_
(
"
You are not allowed to mark notifications from other users as read
.
"
))
raise
PermissionDenied
(
_
(
"
You are not allowed to mark notifications from other users as read
!
"
))
return
redirect
(
"
index
"
)
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