Enhancement of the MinIO admin client functionality with the group function #1343
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Three functions have been added to the client.
A function (addUpdateGroup) to add a group with optional group membership or to update the membership of a Group.
A function (removeGroup) to delete a group.
Example:
Create an empty group:
minioClient.addUpdateGroup(groupName, Status.ENABLED, null);
Update membership of group :
minioClient.addUpdateGroup(groupId, Status.ENABLED, groupMembers);
Delete a group:
minioClient.removeGroup(groupName);
A function (getGroupInfo) to get information of a group.
Example:
Get info of a group:
GroupInfo groupInfo = minioClient.getGroupInfo(groupName);
A function (listGroups) to list all groups.
Example:
List all groups:
List<String> groupsMinio = minioClient.listGroups();
I have extracted the enum status but left it in the class UserInfo so as not to cause any breaking changes.
However, it is recommended to replace the code occurances "UserInfo.Status" with "Status" and then delete the code duplicate of UserInfo