Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
8e8ee808
Commit
8e8ee808
authored
Aug 07, 2016
by
Sli
Browse files
Fixed api permissions
parent
2822d947
Pipeline
#100
failed with stage
in 1 minute and 47 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
api/views/__init__.py
View file @
8e8ee808
...
...
@@ -24,7 +24,7 @@ class RightManagedModelViewSet(viewsets.ModelViewSet):
try
:
if
(
request
.
method
==
'GET'
and
can_view
(
obj
,
user
)):
return
res
elif
(
request
.
method
=
=
'
PUSH
'
and
can_edit
(
obj
,
user
)):
elif
(
request
.
method
!
=
'
GET
'
and
can_edit
(
obj
,
user
)):
return
res
except
:
pass
# To prevent bug with Anonymous user
raise
PermissionDenied
...
...
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