Commit 8d783c48 authored by Leigh Stoller's avatar Leigh Stoller

When revoking access, also revoke protogeni access.

parent 9d958a0d
......@@ -195,6 +195,17 @@ elsif ($global) {
elsif ($revoke) {
$image->RevokeAccess($target) == 0
or fatal("Could not revoke permission for $target");
if ($image->ezid() && $protogeni) {
my $osinfo = OSinfo->Lookup($image->imageid());
if (defined($osinfo)) {
$osinfo->Update({"protogeni_export" => '0'}) == 0
or fatal("Could not update protogeni flag");
}
else {
fatal("Could not lookup OSinfo for $image");
}
}
}
else {
$image->GrantAccess($target, $writable) == 0
......
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