-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#3348] feat(core,server): Add the list operation of the user #4055
Merged
Merged
Changes from 29 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
4ec29a7
Add ListRoles
jerqi 4b333a7
Add the metalake check
jerqi 92c3032
Use join
jerqi 81cd6cb
fix test
jerqi 15144d2
fix npe
jerqi 0e6b040
fix style
jerqi 0a0d6b3
Modify PG SQL
jerqi 9d0821d
fix comment
jerqi feaa46f
refactor the interface
jerqi 91ac43a
rename interface
jerqi d371b97
fix test code errors
jerqi 93d7d38
Add a new interface
jerqi 1707153
make default for list
jerqi ff1640f
rename
jerqi fdc9133
Remove rebudant cast
jerqi 1adae39
Add user with role in IT
jerqi be337b3
address comment
jerqi 5a03882
Fix it
jerqi 6cddd60
Fix it
jerqi c2c5c22
change log level
jerqi 7f5bf9b
Change type
jerqi 882d70d
fix CI
jerqi f246628
rename
jerqi 51f6b00
Remove double deny
jerqi 50170d1
fix
jerqi 162b64a
fix
jerqi a3a7865
rename
jerqi 39e100d
rename
jerqi 154a64b
rename
jerqi c74bf55
modify comment
jerqi 457172b
use unmodified collection
jerqi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
common/src/main/java/org/apache/gravitino/dto/responses/UserListResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.gravitino.dto.responses; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.common.base.Preconditions; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
import org.apache.gravitino.dto.authorization.UserDTO; | ||
|
||
/** Represents a response containing a list of users. */ | ||
@Getter | ||
@ToString | ||
@EqualsAndHashCode(callSuper = true) | ||
public class UserListResponse extends BaseResponse { | ||
|
||
@JsonProperty("users") | ||
private final UserDTO[] users; | ||
|
||
/** | ||
* Constructor for UserListResponse. | ||
* | ||
* @param users The array of users. | ||
*/ | ||
public UserListResponse(UserDTO[] users) { | ||
super(0); | ||
this.users = users; | ||
} | ||
|
||
/** | ||
* This is the constructor that is used by Jackson deserializer to create an instance of | ||
* UserListResponse. | ||
*/ | ||
public UserListResponse() { | ||
super(0); | ||
this.users = null; | ||
} | ||
|
||
/** | ||
* Validates the response data. | ||
* | ||
* @throws IllegalArgumentException if users are not set. | ||
*/ | ||
@Override | ||
public void validate() throws IllegalArgumentException { | ||
super.validate(); | ||
Preconditions.checkArgument(users != null, "users must not be null"); | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.