Skip to content

Commit

Permalink
Fixes bug #913641 - Dashboard can't delete snapshots.
Browse files Browse the repository at this point in the history
Change-Id: I788b02f177bc8ef66845ed6a2e9c5892a2ed7985
  • Loading branch information
kiall committed Jan 23, 2012
1 parent 1e99f1c commit 8cef264
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions django-openstack/django_openstack/dash/views/images.py
Expand Up @@ -68,7 +68,7 @@ def handle(self, request, data):
LOG.exception(error_retrieving)
messages.error(request, error_retrieving)

if image.owner == request.user.username:
if image.owner == request.user.tenant_id:
try:
meta = {
'is_public': True,
Expand Down Expand Up @@ -185,7 +185,7 @@ def handle(self, request, data):
tenant_id = request.user.tenant_id
try:
image = api.image_get(request, image_id)
if image.owner == request.user.username:
if image.owner == request.user.tenant_id:
api.image_delete(request, image_id)
else:
messages.info(request, "Unable to delete image, you are not \
Expand Down
Expand Up @@ -16,7 +16,7 @@
<td>{{image.status|capfirst}}</td>
<td id="actions">
<ul>
{% if image.owner == request.user.username %}
{% if image.owner == request.user.tenant_id %}
<li class="form">{% include "django_openstack/dash/images/_delete.html" with form=delete_form %}</li>
<li><a href="{% url dash_images_update request.user.tenant_id image.id %}">Edit</a></li>
{% endif %}
Expand Down

0 comments on commit 8cef264

Please sign in to comment.