Skip to content

Commit

Permalink
fix(authorization-ranger):the descr field of ranger table x_group is …
Browse files Browse the repository at this point in the history
…not null (#4975)

### What changes were proposed in this pull request?

When calling the ranger CREATE_GROUP api, the desc field cannot be null

### Why are the changes needed?

When calling the ranger CREATE_GROUP api,  ranger response is error.

### Does this PR introduce _any_ user-facing change?



### How was this patch tested?

yes, by hand.

---------

Co-authored-by: yangyx <[email protected]>
  • Loading branch information
2 people authored and web-flow committed Sep 27, 2024
1 parent 174f74d commit f38cba7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ public Boolean onUserAcquired(User user) throws RuntimeException {

@Override
public Boolean onGroupAdded(Group group) throws RuntimeException {
return rangerClient.createGroup(VXGroup.builder().withName(group.name()).build());
return rangerClient.createGroup(
VXGroup.builder().withName(group.name()).withDescription(group.name()).build());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ public Builder withName(String name) {
return this;
}

public Builder withDescription(String description) {
vxGroup.description = description;
return this;
}

public VXGroup build() {
return vxGroup;
}
Expand Down

0 comments on commit f38cba7

Please sign in to comment.