You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@livy.apache.org by GitBox <gi...@apache.org> on 2019/05/06 07:07:42 UTC

[GitHub] [incubator-livy] xuzikun2003 commented on a change in pull request #172: allow proxy user to view or modify his session

xuzikun2003 commented on a change in pull request #172: allow proxy user to view or modify his session
URL: https://github.com/apache/incubator-livy/pull/172#discussion_r281078614
 
 

 ##########
 File path: server/src/main/scala/org/apache/livy/server/AccessManager.scala
 ##########
 @@ -127,16 +127,22 @@ private[livy] class AccessManager(conf: LivyConf) extends Logging {
   }
 
   /**
-   * Check that the request's user has modify access to resources owned by the given target user.
+   * Check that the request's user has modify access to resources whose owner is the given target
+   * user or whose proxy user is the given proxy user.
    */
-  def hasModifyAccess(target: String, requestUser: String): Boolean = {
-    requestUser == target || checkModifyPermissions(requestUser)
+  def hasModifyAccess(target: String, proxyUser: Option[String], requestUser: String): Boolean = {
+    requestUser == target  ||
+    proxyUser != null && proxyUser.getOrElse(null) == requestUser ||
 
 Review comment:
   made the change as you suggested

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services