Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hackinscience
hkis-website
Commits
ccaa7514
Unverified
Commit
ccaa7514
authored
Oct 08, 2021
by
Julien Palard
Browse files
Restrict access to this endpoint.
parent
112ba249
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/views.py
View file @
ccaa7514
...
...
@@ -7,6 +7,7 @@ from django.conf import settings
from
django.contrib
import
messages
from
django.contrib.auth.mixins
import
LoginRequiredMixin
,
UserPassesTestMixin
from
django.contrib.auth.models
import
Group
from
django.contrib.auth.decorators
import
permission_required
from
django.core.exceptions
import
PermissionDenied
from
django.db.models
import
Count
,
Max
,
Q
from
django.http
import
Http404
,
HttpResponseRedirect
,
JsonResponse
...
...
@@ -322,6 +323,8 @@ def team(request, slug):
@
csrf_exempt
@
require_http_methods
([
"POST"
])
@
permission_required
(
"website.view_answer"
)
def
test_check
(
request
):
"""Test a given check code.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment