Commit 34592268 authored by Leigh B Stoller's avatar Leigh B Stoller

Clean up configure variables.

Do not allow a user to be deleted if the user has been exported to a
peer (portal mode). Needs more thought.
parent 7cf678b0
......@@ -34,10 +34,12 @@ my $TBOPS = "@TBOPSEMAIL@";
my $TBLOGS = "@TBLOGSEMAIL@";
my $CONTROL = "@USERNODE@";
my $BOSSNODE= "@BOSSNODE@";
my $OURDOMAIN = "@OURDOMAIN@";
my $PGENISUPPORT = @PROTOGENI_SUPPORT@;
my $MODGROUPS = "$TB/sbin/modgroups";
my $DELACCT = "$TB/sbin/tbacct del";
my $OURDOMAIN = "@OURDOMAIN@";
my $PGENISUPPORT = @PROTOGENI_SUPPORT@;
my $PORTAL_ENABLE = @PORTAL_ENABLE@;
my $PORTAL_PRIMARY = @PORTAL_ISPRIMARY@;
my $MODGROUPS = "$TB/sbin/modgroups";
my $DELACCT = "$TB/sbin/tbacct del";
# Locals
my $user;
......@@ -164,6 +166,18 @@ if ($PGENISUPPORT) {
fatal("$target_user is still heading up ProtoGENI Slices");
}
}
#
# Cannot delete from Portal if exported.
#
if ($PORTAL_ENABLE && $PORTAL_PRIMARY) {
my $exports;
if ($target_user->PeerExports(\$exports) != 0) {
fatal("Could not get peer exports list for $target_user");
}
if (keys(%{ $exports })) {
fatal("Cannot delete user; still exported to peers");
}
}
#
# Sanity check. Must not be the head of any experiments (in the project).
......
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