Commit cfda8cd8 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Return 403 error when image is marked as noexport; this prevents the

descriptor from getting created, so we fail sooner rather then waiting till
later after the resources are allocated and we discover that we are not
allowed to ete the image file.
parent 922964b1
......@@ -50,7 +50,10 @@ $image = Image::LookupByUUID($uuid, $version);
if (! isset($image)) {
SPITERROR(404, "Could not find $uuid!");
if (0 && ! $image->isglobal()) {
if ($image->noexport()) {
SPITERROR(403, "This image is marked as export restricted");
if (!$image->isglobal()) {
SPITERROR(403, "No permission to access image");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment