mgaido91 commented on a change in pull request #141: [LIVY-551] Add "doAs" impersonation support URL: https://github.com/apache/incubator-livy/pull/141#discussion_r252294370
########## File path: server/src/main/scala/org/apache/livy/server/SessionServlet.scala ########## @@ -183,11 +203,11 @@ abstract class SessionServlet[S <: Session, R <: RecoveryMetadata]( private def doWithSession(fn: (S => Any), allowAll: Boolean, - checkFn: Option[(String, String) => Boolean]): Any = { + checkFn: Option[(Session, String) => Boolean]): Any = { val sessionId = params("id").toInt sessionManager.get(sessionId) match { case Some(session) => - if (allowAll || checkFn.map(_(session.owner, remoteUser(request))).getOrElse(false)) { + if (allowAll || checkFn.map(_(session, effectiveUser(request))).getOrElse(false)) { Review comment: Yes, as I said, I think it is fine, but need to be documented ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services