Skip to content

Commit

Permalink
fix: groupInfo: don't attempt to (and fail) display the guest list wh…
Browse files Browse the repository at this point in the history
…en account doesn't have access to it
  • Loading branch information
speed47 committed Dec 17, 2024
1 parent 346c328 commit b4c7a04
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions bin/plugin/open/groupInfo
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,15 @@ sub print_group_info {
if $ret{'members'};

# show guest info, along with the number of accesses each guest has
my @guest_text;
foreach my $guest (@{$ret{'guests'}}) {
my $nb = $ret{'guests_accesses'}{$guest};
push @guest_text, sprintf("%s[%s]", $guest, $nb // '?');
if ($ret{'guests'}) {
my @guest_text;
foreach my $guest (@{$ret{'guests'}}) {
my $nb = $ret{'guests_accesses'}{$guest};
push @guest_text, sprintf("%s[%s]", $guest, $nb // '?');
}
osh_info("Group ${groupName}'s Guests (with access to SOME of the group servers) are: "
. colored(@{$ret{'guests'}} ? join(" ", sort @guest_text) : '-', 'red'));
}
osh_info("Group ${groupName}'s Guests (with access to SOME of the group servers) are: "
. colored(@{$ret{'guests'}} ? join(" ", sort @guest_text) : '-', 'red'))
if $ret{'guests'};

# current user doesn't have enough rights to get this info, tell them that
if (!$ret{'members'}) {
Expand Down

0 comments on commit b4c7a04

Please sign in to comment.