[ 
https://issues.apache.org/jira/browse/HDDS-1611?focusedWorklogId=268880&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-268880
 ]

ASF GitHub Bot logged work on HDDS-1611:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Jun/19 21:56
            Start Date: 27/Jun/19 21:56
    Worklog Time Spent: 10m 
      Work Description: hadoop-yetus commented on pull request #973: HDDS-1611. 
Evaluate ACL on volume bucket key and prefix to authorize access. Contributed 
by Ajay Kumar.
URL: https://github.com/apache/hadoop/pull/973#discussion_r298385910
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
 ##########
 @@ -1623,6 +1625,58 @@ public boolean setAcl(OzoneObj obj, List<OzoneAcl> 
acls) throws IOException {
     }
   }
 
+  /**
+   * Check access for given ozoneObject.
+   *
+   * @param ozObject object for which access needs to be checked.
+   * @param context Context object encapsulating all user related information.
+   * @return true if user has access else false.
+   */
+  @Override
+  public boolean checkAccess(OzoneObj ozObject, RequestContext context)
+      throws OMException {
+    Objects.requireNonNull(ozObject);
+    Objects.requireNonNull(context);
+    Objects.requireNonNull(context.getClientUgi());
+
+    String volume = ozObject.getVolumeName();
+    String bucket = ozObject.getBucketName();
+    String keyName = ozObject.getKeyName();
+
+    metadataManager.getLock().acquireBucketLock(volume, bucket);
+    try {
+      validateBucket(volume, bucket);
+      String objectKey = metadataManager.getOzoneKey(volume, bucket, keyName);
 
 Review comment:
   whitespace:end of line
   
 
----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 268880)
    Time Spent: 3h  (was: 2h 50m)

> Evaluate ACL on volume bucket key and prefix to authorize access 
> -----------------------------------------------------------------
>
>                 Key: HDDS-1611
>                 URL: https://issues.apache.org/jira/browse/HDDS-1611
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Xiaoyu Yao
>            Assignee: Ajay Kumar
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to