Skip to content

Commit

Permalink
fix(ad_group_vsup): fail gracefully if no group name is set
Browse files Browse the repository at this point in the history
- When AD group name is not defined for the resource, fail with
  meaningful message.
  • Loading branch information
zlamalp committed Nov 15, 2022
1 parent 32de7eb commit bbe00c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gen/ad_group_vsup
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ my $usersByResource = {};
foreach my $resourceId ($data->getResourceIds()) {

my $group = $data->getResourceAttributeValue( resource => $resourceId, attrName => $A_R_GROUP_NAME );
unless (defined $group) {
print STDERR "Resource with ID: $resourceId has no AD group name!";
exit 1;
}
$groups->{$group} = 1;

# FOR EACH MEMBER ON RESOURCE
Expand Down

0 comments on commit bbe00c9

Please sign in to comment.