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

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

                Author: ASF GitHub Bot
            Created on: 28/May/19 16:08
            Start Date: 28/May/19 16:08
    Worklog Time Spent: 10m 
      Work Description: xiaoyuyao commented on pull request #847: HDDS-1539. 
Implement addAcl,removeAcl,setAcl,getAcl for Volume. Contributed Ajay Kumar.
URL: https://github.com/apache/hadoop/pull/847#discussion_r288185217
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
 ##########
 @@ -2984,6 +2986,88 @@ public OmKeyInfo lookupFile(OmKeyArgs args) throws 
IOException {
     }
   }
 
+  /**
+   * Add acl for Ozone object. Return true if acl is added successfully else
+   * false.
+   *
+   * @param obj Ozone object for which acl should be added.
+   * @param acl ozone acl top be added.
+   * @throws IOException if there is error.
+   */
+  @Override
+  public boolean addAcl(OzoneObj obj, OzoneAcl acl) throws IOException {
+    if(isAclEnabled) {
+      checkAcls(obj.getResourceType(), obj.getStoreType(), ACLType.WRITE_ACL,
+          obj.getVolumeName(), obj.getBucketName(), obj.getKeyName());
+    }
+    if(obj.getResourceType().equals(ResourceType.VOLUME)) {
+      return volumeManager.addAcl(obj, acl);
+    }
+
 
 Review comment:
   Can you add a TODO for audit log ACL operations on OM?
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 249446)
    Time Spent: 2h 10m  (was: 2h)

> Implement addAcl,removeAcl,setAcl,getAcl for Volume
> ---------------------------------------------------
>
>                 Key: HDDS-1539
>                 URL: https://issues.apache.org/jira/browse/HDDS-1539
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Ajay Kumar
>            Assignee: Ajay Kumar
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Implement addAcl,removeAcl,setAcl,getAcl for Volume



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to