Commit 506a1197 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Allow metadata to be downloaded for all datasets (even if not global).

The metadata does not have anything sensitive, and this is easier than
rolling it into the secure download path via the CM.
parent dabd70cf
# Copyright (c) 2003-2015 University of Utah and the Flux Group.
# Copyright (c) 2003-2016 University of Utah and the Flux Group.
......@@ -53,9 +53,13 @@ if (! isset($image)) {
if ($image->noexport()) {
SPITERROR(403, "This image is marked as export restricted");
if (!$image->isglobal()) {
# We need the dataset metadata, but spew *does* deny it if not global.
if (!$image->isglobal() && !$image->isdataset()) {
SPITERROR(403, "No permission to access image");
if (!$image->released()) {
SPITERROR(403, "Not allowed to access unreleased images");
# Pass imageid:version to backend script if its a specific version request.
$imagearg = ($image->image_uuid() == $uuid && is_null($version) ?
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