[ https://issues.apache.org/jira/browse/HDDS-1538?focusedWorklogId=245373&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-245373 ]
ASF GitHub Bot logged work on HDDS-1538: ---------------------------------------- Author: ASF GitHub Bot Created on: 20/May/19 17:41 Start Date: 20/May/19 17:41 Worklog Time Spent: 10m Work Description: ajayydv commented on pull request #828: HDDS-1538. Update ozone protobuf message for ACLs. Contributed by Ajay Kumar. URL: https://github.com/apache/hadoop/pull/828#discussion_r285699438 ########## File path: hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OzoneAcl.java ########## @@ -47,16 +52,37 @@ public OzoneAcl() { * * @param type - Type * @param name - Name of user - * @param rights - Rights + * @param acl - Rights */ - public OzoneAcl(OzoneACLType type, String name, OzoneACLRights rights) { + public OzoneAcl(ACLIdentityType type, String name, ACLType acl) { this.name = name; - this.rights = rights; + this.rights = new ArrayList<>(); + this.rights.add(acl); this.type = type; - if (type == OzoneACLType.WORLD && name.length() != 0) { + if (type == ACLIdentityType.WORLD && name.length() != 0) { throw new IllegalArgumentException("Unexpected name part in world type"); } - if (((type == OzoneACLType.USER) || (type == OzoneACLType.GROUP)) + if (((type == ACLIdentityType.USER) || (type == ACLIdentityType.GROUP)) + && (name.length() == 0)) { + throw new IllegalArgumentException("User or group name is required"); + } + } + + /** + * Constructor for OzoneAcl. + * + * @param type - Type + * @param name - Name of user + * @param acls - Rights + */ + public OzoneAcl(ACLIdentityType type, String name, List<ACLType> acls) { + this.name = name; + this.rights = acls; + this.type = type; + if (type == ACLIdentityType.WORLD && name.length() != 0) { Review comment: Logic is taken from existing constructor. I think intention is to have a name when type if GROUP and USER but not when it is WORLD. ---------------------------------------------------------------- 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: 245373) Time Spent: 2.5h (was: 2h 20m) > Update ozone protobuf message for ACLs > -------------------------------------- > > Key: HDDS-1538 > URL: https://issues.apache.org/jira/browse/HDDS-1538 > Project: Hadoop Distributed Data Store > Issue Type: Sub-task > Reporter: Ajay Kumar > Assignee: Ajay Kumar > Priority: Major > Labels: pull-request-available > Fix For: 0.4.1 > > Time Spent: 2.5h > Remaining Estimate: 0h > > Update ozone protobuf message for ACLs -- 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