morningman commented on a change in pull request #1443: Persist auth info in
LoadJob
URL: https://github.com/apache/incubator-doris/pull/1443#discussion_r301055381
##########
File path: fe/src/main/java/org/apache/doris/load/loadv2/LoadJob.java
##########
@@ -367,29 +382,54 @@ public void cancelJob(FailMsg failMsg) throws
DdlException, MetaNotFoundExceptio
logFinalOperation();
}
- private void checkAuth() throws DdlException, MetaNotFoundException {
+ private void checkAuth() throws DdlException {
+ if (authorizationInfo == null) {
+ // use the old method to check priv
+ checkAuthWithoutAuthInfo();
+ return;
+ }
+ if
(!Catalog.getCurrentCatalog().getAuth().checkPrivByAuthInfo(ConnectContext.get(),
authorizationInfo,
+
PrivPredicate.LOAD)) {
+
ErrorReport.reportDdlException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR,
Review comment:
ERR_SPECIFIC_ACCESS_DENIED_ERROR does not receive the following 3
parameters, and unfortunately, there is no error code matching your demand...
So maybe just use ERR_SPECIFIC_ACCESS_DENIED_ERROR with parameter "LOAD"
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]