1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +00:00

Fixed access without admins prermission

This commit is contained in:
Retspen 2015-06-24 09:54:46 +03:00
parent 7c5b606538
commit e54fd13e9a

View file

@ -77,6 +77,9 @@ def storage(request, compute_id, pool):
if not request.user.is_authenticated(): if not request.user.is_authenticated():
return HttpResponseRedirect(reverse('index')) return HttpResponseRedirect(reverse('index'))
if not request.user.is_superuser:
return HttpResponseRedirect(reverse('index'))
def handle_uploaded_file(path, f_name): def handle_uploaded_file(path, f_name):
target = path + '/' + str(f_name) target = path + '/' + str(f_name)
destination = open(target, 'wb+') destination = open(target, 'wb+')