Commit 6b6fdafa authored by Leigh Stoller's avatar Leigh Stoller

Fix and close issue #372.

parent c4f0e2ee
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -181,8 +181,23 @@ if ($PGENISUPPORT) {
my $urn = GeniHRN::Generate("@OURDOMAIN@", "user", $target_uid);
my $geniuser = GeniUser->Lookup($urn, 1);
if (defined($geniuser) && GeniSlice->LookupByCreator($geniuser)) {
fatal("$target_user is still heading up ProtoGENI Slices");
if (defined($geniuser)) {
my @slices = GeniSlice->LookupByCreator($geniuser);
if (@slices) {
if (defined($project)) {
foreach my $slice (@slices) {
my $slice_urn = $slice->urn();
if (defined($slice_urn->project()) &&
lc($slice_urn->project()) eq lc($project->pid())) {
fatal("$target_user is still heading up ".
"ProtoGENI Slices in project $pid");
}
}
}
else {
fatal("$target_user is still heading up ProtoGENI Slices");
}
}
}
}
#
......
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