drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacques-n <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-4281: Support authorized users to delega...
Date Fri, 04 Mar 2016 01:09:15 GMT
Github user jacques-n commented on a diff in the pull request:

    https://github.com/apache/drill/pull/400#discussion_r54976899
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserSession.java
---
    @@ -116,14 +137,38 @@ public OptionManager getOptions() {
         return sessionOptions;
       }
     
    -  public DrillUser getUser() {
    -    return user;
    -  }
    -
       public UserCredentials getCredentials() {
         return credentials;
       }
     
    +  /**
    +   * Replace current user credentials with the given user's credentials, if authorized.
    +   *
    +   * @param delegatorName delegator name
    +   * @throws DrillRuntimeException if credentials cannot be replaced
    +   */
    +  public void replaceUserCredentials(final String delegatorName) {
    +    assert enableDelegation;
    --- End diff --
    
    No need for assert, preconditions makes sure we get Exception instead of typically uncaptured
Error subclass and this isn't perf sensitive.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message