Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
72cc63fe
authored
Sep 10, 2015
by
Estók Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
dc1a5179
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
circle/setty/storage.py
+1
-0
circle/setty/views.py
+3
-2
No files found.
circle/setty/storage.py
View file @
72cc63fe
...
...
@@ -2,6 +2,7 @@ from django.core.files.storage import FileSystemStorage
from
django.conf
import
settings
import
os
class
OverwriteStorage
(
FileSystemStorage
):
def
get_available_name
(
self
,
name
):
if
self
.
exists
(
name
):
...
...
circle/setty/views.py
View file @
72cc63fe
...
...
@@ -21,7 +21,7 @@ class IndexView(TemplateView):
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
if
self
.
request
.
user
.
is_authenticated
():
return
TemplateView
.
get
(
self
,
request
,
*
args
,
**
kwargs
)
# To be checked!
return
TemplateView
.
get
(
self
,
request
,
*
args
,
**
kwargs
)
else
:
return
redirect
(
auth
.
views
.
login
)
...
...
@@ -113,7 +113,8 @@ class DetailView(IndexView):
try
:
serviceObject
=
Service
.
objects
.
get
(
id
=
kwargs
[
'pk'
])
if
serviceObject
.
user
!=
self
.
request
.
user
:
return
HttpResponseForbidden
(
"You don't have permission to open the service."
)
return
HttpResponseForbidden
(
"You don't have permission to open the service."
)
except
:
raise
Http404
else
:
...
...
Write
Preview
Markdown
is supported
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