Commit afed049f authored by Leigh Stoller's avatar Leigh Stoller

Add list of sub authorities to user Resolve(); this is the list of

projects to which they belong.
parent 1227b2b0
......@@ -294,7 +294,25 @@ sub Resolve($)
"name" => $geniuser->name(),
"slices" => \@sliceURNs
};
if ($geniuser->IsLocal()) {
my @projects = ();
my %subsas = ();
if ($geniuser->emulab_user()->ProjectMembershipList(\@projects)) {
print STDERR "Could not get project membership for $geniuser\n";
}
else {
foreach my $project (@projects) {
my $pid = $project->pid();
my $urn = GeniHRN::Generate("$OURDOMAIN:$pid",
"authority", "sa");
my $url = "@TBBASE@/protogeni/xmlrpc/project/$pid/sa";
$subsas{$urn} = $url;
}
$blob->{'subauthorities'} = \%subsas;
}
}
return GeniResponse->Create(GENIRESPONSE_SUCCESS, $blob);
}
if ($type eq "slice") {
......
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