Re: [PR] [#6060] fix(core): Add the check of requests related to authorization [gravitino]
jerryshao merged PR #6065: URL: https://github.com/apache/gravitino/pull/6065 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] [#6060] fix(core): Add the check of requests related to authorization [gravitino]
jerqi commented on code in PR #6065:
URL: https://github.com/apache/gravitino/pull/6065#discussion_r1901606785
##
common/src/main/java/org/apache/gravitino/dto/requests/RoleCreateRequest.java:
##
@@ -79,5 +79,14 @@ public void validate() throws IllegalArgumentException {
Preconditions.checkArgument(
StringUtils.isNotBlank(name), "\"name\" field is required and cannot
be empty");
Preconditions.checkArgument(securableObjects != null,
"\"securableObjects\" can't null ");
+for (SecurableObjectDTO objectDTO : securableObjects) {
Review Comment:
securable objects can be empty.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] [#6060] fix(core): Add the check of requests related to authorization [gravitino]
jerryshao commented on code in PR #6065:
URL: https://github.com/apache/gravitino/pull/6065#discussion_r1901594234
##
common/src/main/java/org/apache/gravitino/dto/requests/RoleCreateRequest.java:
##
@@ -79,5 +79,14 @@ public void validate() throws IllegalArgumentException {
Preconditions.checkArgument(
StringUtils.isNotBlank(name), "\"name\" field is required and cannot
be empty");
Preconditions.checkArgument(securableObjects != null,
"\"securableObjects\" can't null ");
+for (SecurableObjectDTO objectDTO : securableObjects) {
Review Comment:
Can securable objects be empty?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] [#6060] fix(core): Add the check of requests related to authorization [gravitino]
jerqi commented on code in PR #6065:
URL: https://github.com/apache/gravitino/pull/6065#discussion_r1900828950
##
common/src/main/java/org/apache/gravitino/dto/requests/RoleCreateRequest.java:
##
@@ -79,5 +79,14 @@ public void validate() throws IllegalArgumentException {
Preconditions.checkArgument(
StringUtils.isNotBlank(name), "\"name\" field is required and cannot
be empty");
Preconditions.checkArgument(securableObjects != null,
"\"securableObjects\" can't null ");
+for (SecurableObjectDTO objectDTO : securableObjects) {
+ Preconditions.checkArgument(
+ StringUtils.isNotBlank(objectDTO.name()), "\" securable object
name\" can't be blank");
Review Comment:
Removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] [#6060] fix(core): Add the check of requests related to authorization [gravitino]
yuqi1129 commented on code in PR #6065:
URL: https://github.com/apache/gravitino/pull/6065#discussion_r1900790847
##
common/src/main/java/org/apache/gravitino/dto/requests/RoleCreateRequest.java:
##
@@ -79,5 +79,14 @@ public void validate() throws IllegalArgumentException {
Preconditions.checkArgument(
StringUtils.isNotBlank(name), "\"name\" field is required and cannot
be empty");
Preconditions.checkArgument(securableObjects != null,
"\"securableObjects\" can't null ");
+for (SecurableObjectDTO objectDTO : securableObjects) {
+ Preconditions.checkArgument(
+ StringUtils.isNotBlank(objectDTO.name()), "\" securable object
name\" can't be blank");
Review Comment:
There is a space before word `securable`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
[PR] [#6060] fix(core): Add the check of requests related to authorization [gravitino]
jerqi opened a new pull request, #6065: URL: https://github.com/apache/gravitino/pull/6065 ### What changes were proposed in this pull request? Add the check of requests related to authorization ### Why are the changes needed? Fix: #6060 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Added UT. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
