Allow members of "Admin" Team to wipe version envs (#3791)
* Allow members of "Admin" Team to wipe version envs * Ignore celery beat fileshumitos/resolver/username-regex
parent
d30cc12d71
commit
e73b266558
|
@ -17,6 +17,7 @@ _build
|
|||
bower_components/
|
||||
contrib/supervisord.log
|
||||
contrib/supervisord.pid
|
||||
celerybeat-schedule.*
|
||||
deploy/.vagrant
|
||||
dist/*
|
||||
local_settings.py
|
||||
|
|
|
@ -77,7 +77,9 @@ def wipe_version(request, project_slug, version_slug):
|
|||
project__slug=project_slug,
|
||||
slug=version_slug,
|
||||
)
|
||||
if request.user not in version.project.users.all():
|
||||
# We need to check by ``for_admin_user`` here to allow members of the
|
||||
# ``Admin`` team (which doesn't own the project) under the corporate site.
|
||||
if version.project not in Project.objects.for_admin_user(user=request.user):
|
||||
raise Http404('You must own this project to wipe it.')
|
||||
|
||||
if request.method == 'POST':
|
||||
|
|
Loading…
Reference in New Issue