[ 
https://issues.apache.org/jira/browse/AIRAVATA-2591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16273781#comment-16273781
 ] 

ASF GitHub Bot commented on AIRAVATA-2591:
------------------------------------------

smarru closed pull request #144: [AIRAVATA-2591] Fix (Ref #141) 
URL: https://github.com/apache/airavata/pull/144
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupOwnerEntity.java
 
b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupOwnerEntity.java
deleted file mode 100644
index 5a15ee5f20..0000000000
--- 
a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupOwnerEntity.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.apache.airavata.sharing.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "GROUP_OWNER", schema = "")
-@IdClass(GroupOwnerPK.class)
-public class GroupOwnerEntity {
-    private final static Logger logger = 
LoggerFactory.getLogger(GroupOwnerEntity.class);
-    private String groupId;
-    private String domainId;
-    private String ownerId;
-
-    @Column(name = "GROUP_ID")
-    public String getGroupId() {
-        return groupId;
-    }
-
-    public void setGroupId(String groupId) {
-        this.groupId = groupId;
-    }
-
-    @Id
-    @Column(name = "DOMAIN_ID")
-    public String getDomainId() {
-        return domainId;
-    }
-
-    public void setDomainId(String domainId) {
-        this.domainId = domainId;
-    }
-    @Id
-    @Column(name = "OWNER_ID")
-    public String getOwnerId() {
-        return ownerId;
-    }
-
-    public void setOwnerId(String ownerId) {
-        this.ownerId = ownerId;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-
-        GroupOwnerEntity that = (GroupOwnerEntity) o;
-
-        if (!getGroupId().equals(that.getGroupId())) return false;
-        if (!getDomainId().equals(that.getDomainId())) return false;
-        return getOwnerId().equals(that.getOwnerId());
-    }
-
-    @Override
-    public int hashCode() {
-        int result = getGroupId().hashCode();
-        result = 31 * result + getDomainId().hashCode();
-        result = 31 * result + getOwnerId().hashCode();
-        return result;
-    }
-}
diff --git 
a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupOwnerPK.java
 
b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupOwnerPK.java
deleted file mode 100644
index 365e9e0fe6..0000000000
--- 
a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupOwnerPK.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.apache.airavata.sharing.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.Column;
-import javax.persistence.Id;
-import java.io.Serializable;
-
-public class GroupOwnerPK implements Serializable{
-
-    private final static Logger logger = 
LoggerFactory.getLogger(GroupOwnerPK.class);
-    private String ownerId;
-    private String domainId;
-
-    @Id
-    @Column(name = "DOMAIN_ID")
-    public String getDomainId() {
-        return domainId;
-    }
-
-    public void setDomainId(String domainId) {
-        this.domainId = domainId;
-    }
-
-    @Id
-    @Column(name = "OWNER_ID")
-    public String getOwnerId() {
-        return ownerId;
-    }
-
-    public void setOwnerId(String ownerId) {
-        this.ownerId = ownerId;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-
-        GroupOwnerPK groupOwnerPK = (GroupOwnerPK) o;
-
-        if (!getOwnerId().equals(groupOwnerPK.getOwnerId())) return false;
-        return getDomainId().equals(groupOwnerPK.getDomainId());
-    }
-
-    @Override
-    public int hashCode() {
-        int result = getOwnerId().hashCode();
-        result = 31 * result + getDomainId().hashCode();
-        return result;
-    }
-}
diff --git 
a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupOwnerRepository.java
 
b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupOwnerRepository.java
deleted file mode 100644
index e3a809c149..0000000000
--- 
a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupOwnerRepository.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.apache.airavata.sharing.registry.db.repositories;
-
-import org.apache.airavata.sharing.registry.db.entities.GroupOwnerEntity;
-import org.apache.airavata.sharing.registry.db.entities.GroupOwnerPK;
-import org.apache.airavata.sharing.registry.models.GroupOwner;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class GroupOwnerRepository extends AbstractRepository<GroupOwner, 
GroupOwnerEntity, GroupOwnerPK>{
-
-    private final static Logger logger = 
LoggerFactory.getLogger(GroupOwnerRepository.class);
-
-    public GroupOwnerRepository() {
-        super(GroupOwner.class, GroupOwnerEntity.class);
-    }
-}
diff --git 
a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
 
b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
index 60f5786f24..dd84d6970f 100644
--- 
a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
+++ 
b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
@@ -421,7 +421,6 @@ public boolean transferGroupOwnership(String domainId, 
String groupId, String ne
             userGroupPK.setGroupId(groupId);
             userGroupPK.setDomainId(domainId);
             UserGroup userGroup = (new UserGroupRepository()).get(userGroupPK);
-            String currentOwnerId = userGroup.getOwnerId();
             UserGroup newUserGroup = new UserGroup();
             newUserGroup.setUpdatedTime(System.currentTimeMillis());
             newUserGroup.setOwnerId(newOwnerId);
@@ -431,17 +430,6 @@ public boolean transferGroupOwnership(String domainId, 
String groupId, String ne
 
             (new UserGroupRepository()).update(newUserGroup);
 
-            GroupOwnerPK groupOwnerPK = new GroupOwnerPK();
-            groupOwnerPK.setDomainId(domainId);
-            groupOwnerPK.setOwnerId(currentOwnerId);
-            GroupOwner currentOwner = (new 
GroupOwnerRepository()).get(groupOwnerPK);
-            GroupOwner newOwner = new GroupOwner();
-            newOwner.setDomainId(domainId);
-            newOwner.setOwnerId(newOwnerId);
-            newOwner.setGroupId(groupId);
-            newOwner = getUpdatedObject(currentOwner, newOwner);
-
-            (new GroupOwnerRepository()).update(newOwner);
             return true;
         }
         catch (Throwable ex) {
@@ -515,16 +503,13 @@ public boolean hasAdminAccess(String domainId, String 
groupId, String adminId) t
     @Override
     public boolean hasOwnerAccess(String domainId, String groupId, String 
ownerId) throws SharingRegistryException, TException {
         try {
-            GroupOwnerPK groupOwnerPK = new GroupOwnerPK();
-            groupOwnerPK.setDomainId(domainId);
-            groupOwnerPK.setOwnerId(ownerId);
-
-            GroupOwner owner = (new GroupOwnerRepository()).get(groupOwnerPK);
-            if (owner != null) {
-                if (owner.groupId.equals(groupId)) {
-                    return true;
-                }
-            }
+            UserGroupPK userGroupPK = new UserGroupPK();
+            userGroupPK.setGroupId(groupId);
+            userGroupPK.setDomainId(domainId);
+            UserGroup getGroup = (new UserGroupRepository()).get(userGroupPK);
+
+            if(getGroup.ownerId.equals(ownerId))
+                return true;
             return false;
         }
         catch (Throwable ex) {
diff --git 
a/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml
 
b/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml
index c650e59650..936b84d2c5 100644
--- 
a/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml
+++ 
b/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml
@@ -11,7 +11,6 @@
         
<class>org.apache.airavata.sharing.registry.db.entities.SharingEntity</class>
         
<class>org.apache.airavata.sharing.registry.db.entities.UserEntity</class>
         
<class>org.apache.airavata.sharing.registry.db.entities.GroupAdminEntity</class>
-        
<class>org.apache.airavata.sharing.registry.db.entities.GroupOwnerEntity</class>
         
<class>org.apache.airavata.sharing.registry.db.entities.UserGroupEntity</class>
     </persistence-unit>
 </persistence>
diff --git 
a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
 
b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
index a4d8676aae..a7038e2517 100644
--- 
a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
+++ 
b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
@@ -42,14 +42,6 @@ CREATE TABLE SHARING_USER (
   FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON 
UPDATE NO ACTION
 );
 
-CREATE TABLE GROUP_OWNER (
-  OWNER_ID VARCHAR(255) NOT NULL,
-  GROUP_ID VARCHAR(255) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  PRIMARY KEY (OWNER_ID, DOMAIN_ID),
-  FOREIGN KEY (OWNER_ID, DOMAIN_ID) REFERENCES SHARING_USER(USER_ID, 
DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
-);
-
 CREATE TABLE GROUP_ADMIN (
   ADMIN_ID VARCHAR(255) NOT NULL,
   GROUP_ID VARCHAR(255) NOT NULL,
diff --git 
a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
 
b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
index 2e05cb64ca..145d9260e5 100644
--- 
a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
+++ 
b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
@@ -56,14 +56,6 @@ CREATE TABLE USER_GROUP (
   FOREIGN KEY (OWNER_ID, DOMAIN_ID) REFERENCES SHARING_USER(USER_ID, 
DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 )ENGINE=InnoDB DEFAULT CHARACTER SET=latin1;
 
-CREATE TABLE GROUP_OWNER (
-  OWNER_ID VARCHAR(255) NOT NULL,
-  GROUP_ID VARCHAR(255) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  PRIMARY KEY (OWNER_ID, DOMAIN_ID),
-  FOREIGN KEY (OWNER_ID, DOMAIN_ID) REFERENCES SHARING_USER(USER_ID, 
DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
-)ENGINE=InnoDB DEFAULT CHARACTER SET=latin1;
-
 CREATE TABLE GROUP_ADMIN (
   ADMIN_ID VARCHAR(255) NOT NULL,
   GROUP_ID VARCHAR(255) NOT NULL,
diff --git 
a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupOwner.java
 
b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupOwner.java
deleted file mode 100644
index 3c0811b557..0000000000
--- 
a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupOwner.java
+++ /dev/null
@@ -1,582 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (1.0.0-dev)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-package org.apache.airavata.sharing.registry.models;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
[email protected](value = "Autogenerated by Thrift Compiler 
(1.0.0-dev)")
-public class GroupOwner implements org.apache.thrift.TBase<GroupOwner, 
GroupOwner._Fields>, java.io.Serializable, Cloneable, Comparable<GroupOwner> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new 
org.apache.thrift.protocol.TStruct("GroupOwner");
-
-  private static final org.apache.thrift.protocol.TField GROUP_ID_FIELD_DESC = 
new org.apache.thrift.protocol.TField("groupId", 
org.apache.thrift.protocol.TType.STRING, (short)1);
-  private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC 
= new org.apache.thrift.protocol.TField("domainId", 
org.apache.thrift.protocol.TType.STRING, (short)2);
-  private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = 
new org.apache.thrift.protocol.TField("ownerId", 
org.apache.thrift.protocol.TType.STRING, (short)3);
-
-  private static final org.apache.thrift.scheme.SchemeFactory 
STANDARD_SCHEME_FACTORY = new GroupOwnerStandardSchemeFactory();
-  private static final org.apache.thrift.scheme.SchemeFactory 
TUPLE_SCHEME_FACTORY = new GroupOwnerTupleSchemeFactory();
-
-  public java.lang.String groupId; // optional
-  public java.lang.String domainId; // optional
-  public java.lang.String ownerId; // optional
-
-  /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
-  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    GROUP_ID((short)1, "groupId"),
-    DOMAIN_ID((short)2, "domainId"),
-    OWNER_ID((short)3, "ownerId");
-
-    private static final java.util.Map<java.lang.String, _Fields> byName = new 
java.util.HashMap<java.lang.String, _Fields>();
-
-    static {
-      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
-        byName.put(field.getFieldName(), field);
-      }
-    }
-
-    /**
-     * Find the _Fields constant that matches fieldId, or null if its not 
found.
-     */
-    public static _Fields findByThriftId(int fieldId) {
-      switch(fieldId) {
-        case 1: // GROUP_ID
-          return GROUP_ID;
-        case 2: // DOMAIN_ID
-          return DOMAIN_ID;
-        case 3: // OWNER_ID
-          return OWNER_ID;
-        default:
-          return null;
-      }
-    }
-
-    /**
-     * Find the _Fields constant that matches fieldId, throwing an exception
-     * if it is not found.
-     */
-    public static _Fields findByThriftIdOrThrow(int fieldId) {
-      _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new java.lang.IllegalArgumentException("Field 
" + fieldId + " doesn't exist!");
-      return fields;
-    }
-
-    /**
-     * Find the _Fields constant that matches name, or null if its not found.
-     */
-    public static _Fields findByName(java.lang.String name) {
-      return byName.get(name);
-    }
-
-    private final short _thriftId;
-    private final java.lang.String _fieldName;
-
-    _Fields(short thriftId, java.lang.String fieldName) {
-      _thriftId = thriftId;
-      _fieldName = fieldName;
-    }
-
-    public short getThriftFieldId() {
-      return _thriftId;
-    }
-
-    public java.lang.String getFieldName() {
-      return _fieldName;
-    }
-  }
-
-  // isset id assignments
-  private static final _Fields optionals[] = 
{_Fields.GROUP_ID,_Fields.DOMAIN_ID,_Fields.OWNER_ID};
-  public static final java.util.Map<_Fields, 
org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-  static {
-    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = 
new java.util.EnumMap<_Fields, 
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.GROUP_ID, new 
org.apache.thrift.meta_data.FieldMetaData("groupId", 
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.DOMAIN_ID, new 
org.apache.thrift.meta_data.FieldMetaData("domainId", 
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.OWNER_ID, new 
org.apache.thrift.meta_data.FieldMetaData("ownerId", 
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
-    
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GroupOwner.class,
 metaDataMap);
-  }
-
-  public GroupOwner() {
-  }
-
-  /**
-   * Performs a deep copy on <i>other</i>.
-   */
-  public GroupOwner(GroupOwner other) {
-    if (other.isSetGroupId()) {
-      this.groupId = other.groupId;
-    }
-    if (other.isSetDomainId()) {
-      this.domainId = other.domainId;
-    }
-    if (other.isSetOwnerId()) {
-      this.ownerId = other.ownerId;
-    }
-  }
-
-  public GroupOwner deepCopy() {
-    return new GroupOwner(this);
-  }
-
-  @Override
-  public void clear() {
-    this.groupId = null;
-    this.domainId = null;
-    this.ownerId = null;
-  }
-
-  public java.lang.String getGroupId() {
-    return this.groupId;
-  }
-
-  public GroupOwner setGroupId(java.lang.String groupId) {
-    this.groupId = groupId;
-    return this;
-  }
-
-  public void unsetGroupId() {
-    this.groupId = null;
-  }
-
-  /** Returns true if field groupId is set (has been assigned a value) and 
false otherwise */
-  public boolean isSetGroupId() {
-    return this.groupId != null;
-  }
-
-  public void setGroupIdIsSet(boolean value) {
-    if (!value) {
-      this.groupId = null;
-    }
-  }
-
-  public java.lang.String getDomainId() {
-    return this.domainId;
-  }
-
-  public GroupOwner setDomainId(java.lang.String domainId) {
-    this.domainId = domainId;
-    return this;
-  }
-
-  public void unsetDomainId() {
-    this.domainId = null;
-  }
-
-  /** Returns true if field domainId is set (has been assigned a value) and 
false otherwise */
-  public boolean isSetDomainId() {
-    return this.domainId != null;
-  }
-
-  public void setDomainIdIsSet(boolean value) {
-    if (!value) {
-      this.domainId = null;
-    }
-  }
-
-  public java.lang.String getOwnerId() {
-    return this.ownerId;
-  }
-
-  public GroupOwner setOwnerId(java.lang.String ownerId) {
-    this.ownerId = ownerId;
-    return this;
-  }
-
-  public void unsetOwnerId() {
-    this.ownerId = null;
-  }
-
-  /** Returns true if field ownerId is set (has been assigned a value) and 
false otherwise */
-  public boolean isSetOwnerId() {
-    return this.ownerId != null;
-  }
-
-  public void setOwnerIdIsSet(boolean value) {
-    if (!value) {
-      this.ownerId = null;
-    }
-  }
-
-  public void setFieldValue(_Fields field, java.lang.Object value) {
-    switch (field) {
-    case GROUP_ID:
-      if (value == null) {
-        unsetGroupId();
-      } else {
-        setGroupId((java.lang.String)value);
-      }
-      break;
-
-    case DOMAIN_ID:
-      if (value == null) {
-        unsetDomainId();
-      } else {
-        setDomainId((java.lang.String)value);
-      }
-      break;
-
-    case OWNER_ID:
-      if (value == null) {
-        unsetOwnerId();
-      } else {
-        setOwnerId((java.lang.String)value);
-      }
-      break;
-
-    }
-  }
-
-  public java.lang.Object getFieldValue(_Fields field) {
-    switch (field) {
-    case GROUP_ID:
-      return getGroupId();
-
-    case DOMAIN_ID:
-      return getDomainId();
-
-    case OWNER_ID:
-      return getOwnerId();
-
-    }
-    throw new java.lang.IllegalStateException();
-  }
-
-  /** Returns true if field corresponding to fieldID is set (has been assigned 
a value) and false otherwise */
-  public boolean isSet(_Fields field) {
-    if (field == null) {
-      throw new java.lang.IllegalArgumentException();
-    }
-
-    switch (field) {
-    case GROUP_ID:
-      return isSetGroupId();
-    case DOMAIN_ID:
-      return isSetDomainId();
-    case OWNER_ID:
-      return isSetOwnerId();
-    }
-    throw new java.lang.IllegalStateException();
-  }
-
-  @Override
-  public boolean equals(java.lang.Object that) {
-    if (that == null)
-      return false;
-    if (that instanceof GroupOwner)
-      return this.equals((GroupOwner)that);
-    return false;
-  }
-
-  public boolean equals(GroupOwner that) {
-    if (that == null)
-      return false;
-    if (this == that)
-      return true;
-
-    boolean this_present_groupId = true && this.isSetGroupId();
-    boolean that_present_groupId = true && that.isSetGroupId();
-    if (this_present_groupId || that_present_groupId) {
-      if (!(this_present_groupId && that_present_groupId))
-        return false;
-      if (!this.groupId.equals(that.groupId))
-        return false;
-    }
-
-    boolean this_present_domainId = true && this.isSetDomainId();
-    boolean that_present_domainId = true && that.isSetDomainId();
-    if (this_present_domainId || that_present_domainId) {
-      if (!(this_present_domainId && that_present_domainId))
-        return false;
-      if (!this.domainId.equals(that.domainId))
-        return false;
-    }
-
-    boolean this_present_ownerId = true && this.isSetOwnerId();
-    boolean that_present_ownerId = true && that.isSetOwnerId();
-    if (this_present_ownerId || that_present_ownerId) {
-      if (!(this_present_ownerId && that_present_ownerId))
-        return false;
-      if (!this.ownerId.equals(that.ownerId))
-        return false;
-    }
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int hashCode = 1;
-
-    hashCode = hashCode * 8191 + ((isSetGroupId()) ? 131071 : 524287);
-    if (isSetGroupId())
-      hashCode = hashCode * 8191 + groupId.hashCode();
-
-    hashCode = hashCode * 8191 + ((isSetDomainId()) ? 131071 : 524287);
-    if (isSetDomainId())
-      hashCode = hashCode * 8191 + domainId.hashCode();
-
-    hashCode = hashCode * 8191 + ((isSetOwnerId()) ? 131071 : 524287);
-    if (isSetOwnerId())
-      hashCode = hashCode * 8191 + ownerId.hashCode();
-
-    return hashCode;
-  }
-
-  @Override
-  public int compareTo(GroupOwner other) {
-    if (!getClass().equals(other.getClass())) {
-      return getClass().getName().compareTo(other.getClass().getName());
-    }
-
-    int lastComparison = 0;
-
-    lastComparison = 
java.lang.Boolean.valueOf(isSetGroupId()).compareTo(other.isSetGroupId());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetGroupId()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, 
other.groupId);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = 
java.lang.Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetDomainId()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, 
other.domainId);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = 
java.lang.Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetOwnerId()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, 
other.ownerId);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    return 0;
-  }
-
-  public _Fields fieldForId(int fieldId) {
-    return _Fields.findByThriftId(fieldId);
-  }
-
-  public void read(org.apache.thrift.protocol.TProtocol iprot) throws 
org.apache.thrift.TException {
-    scheme(iprot).read(iprot, this);
-  }
-
-  public void write(org.apache.thrift.protocol.TProtocol oprot) throws 
org.apache.thrift.TException {
-    scheme(oprot).write(oprot, this);
-  }
-
-  @Override
-  public java.lang.String toString() {
-    java.lang.StringBuilder sb = new java.lang.StringBuilder("GroupOwner(");
-    boolean first = true;
-
-    if (isSetGroupId()) {
-      sb.append("groupId:");
-      if (this.groupId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.groupId);
-      }
-      first = false;
-    }
-    if (isSetDomainId()) {
-      if (!first) sb.append(", ");
-      sb.append("domainId:");
-      if (this.domainId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.domainId);
-      }
-      first = false;
-    }
-    if (isSetOwnerId()) {
-      if (!first) sb.append(", ");
-      sb.append("ownerId:");
-      if (this.ownerId == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.ownerId);
-      }
-      first = false;
-    }
-    sb.append(")");
-    return sb.toString();
-  }
-
-  public void validate() throws org.apache.thrift.TException {
-    // check for required fields
-    // check for sub-struct validity
-  }
-
-  private void writeObject(java.io.ObjectOutputStream out) throws 
java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new 
org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws 
java.io.IOException, java.lang.ClassNotFoundException {
-    try {
-      read(new org.apache.thrift.protocol.TCompactProtocol(new 
org.apache.thrift.transport.TIOStreamTransport(in)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private static class GroupOwnerStandardSchemeFactory implements 
org.apache.thrift.scheme.SchemeFactory {
-    public GroupOwnerStandardScheme getScheme() {
-      return new GroupOwnerStandardScheme();
-    }
-  }
-
-  private static class GroupOwnerStandardScheme extends 
org.apache.thrift.scheme.StandardScheme<GroupOwner> {
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot, GroupOwner 
struct) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField schemeField;
-      iprot.readStructBegin();
-      while (true)
-      {
-        schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (schemeField.id) {
-          case 1: // GROUP_ID
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.groupId = iprot.readString();
-              struct.setGroupIdIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
-            }
-            break;
-          case 2: // DOMAIN_ID
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.domainId = iprot.readString();
-              struct.setDomainIdIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
-            }
-            break;
-          case 3: // OWNER_ID
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.ownerId = iprot.readString();
-              struct.setOwnerIdIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked 
in the validate method
-      struct.validate();
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot, GroupOwner 
struct) throws org.apache.thrift.TException {
-      struct.validate();
-
-      oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.groupId != null) {
-        if (struct.isSetGroupId()) {
-          oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
-          oprot.writeString(struct.groupId);
-          oprot.writeFieldEnd();
-        }
-      }
-      if (struct.domainId != null) {
-        if (struct.isSetDomainId()) {
-          oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
-          oprot.writeString(struct.domainId);
-          oprot.writeFieldEnd();
-        }
-      }
-      if (struct.ownerId != null) {
-        if (struct.isSetOwnerId()) {
-          oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
-          oprot.writeString(struct.ownerId);
-          oprot.writeFieldEnd();
-        }
-      }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
-
-  }
-
-  private static class GroupOwnerTupleSchemeFactory implements 
org.apache.thrift.scheme.SchemeFactory {
-    public GroupOwnerTupleScheme getScheme() {
-      return new GroupOwnerTupleScheme();
-    }
-  }
-
-  private static class GroupOwnerTupleScheme extends 
org.apache.thrift.scheme.TupleScheme<GroupOwner> {
-
-    @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, GroupOwner 
struct) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TTupleProtocol oprot = 
(org.apache.thrift.protocol.TTupleProtocol) prot;
-      java.util.BitSet optionals = new java.util.BitSet();
-      if (struct.isSetGroupId()) {
-        optionals.set(0);
-      }
-      if (struct.isSetDomainId()) {
-        optionals.set(1);
-      }
-      if (struct.isSetOwnerId()) {
-        optionals.set(2);
-      }
-      oprot.writeBitSet(optionals, 3);
-      if (struct.isSetGroupId()) {
-        oprot.writeString(struct.groupId);
-      }
-      if (struct.isSetDomainId()) {
-        oprot.writeString(struct.domainId);
-      }
-      if (struct.isSetOwnerId()) {
-        oprot.writeString(struct.ownerId);
-      }
-    }
-
-    @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, GroupOwner 
struct) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TTupleProtocol iprot = 
(org.apache.thrift.protocol.TTupleProtocol) prot;
-      java.util.BitSet incoming = iprot.readBitSet(3);
-      if (incoming.get(0)) {
-        struct.groupId = iprot.readString();
-        struct.setGroupIdIsSet(true);
-      }
-      if (incoming.get(1)) {
-        struct.domainId = iprot.readString();
-        struct.setDomainIdIsSet(true);
-      }
-      if (incoming.get(2)) {
-        struct.ownerId = iprot.readString();
-        struct.setOwnerIdIsSet(true);
-      }
-    }
-  }
-
-  private static <S extends org.apache.thrift.scheme.IScheme> S 
scheme(org.apache.thrift.protocol.TProtocol proto) {
-    return 
(org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? 
STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
-  }
-}
-
diff --git a/modules/sharing-registry/sharing-service-docs/api-docs/index.html 
b/modules/sharing-registry/sharing-service-docs/api-docs/index.html
index 97b8af4b69..267808788b 100644
--- a/modules/sharing-registry/sharing-service-docs/api-docs/index.html
+++ b/modules/sharing-registry/sharing-service-docs/api-docs/index.html
@@ -77,7 +77,6 @@ <h1>All Thrift declarations</h1>
 <a href="sharing_models.html#Enum_GroupCardinality">GroupCardinality</a><br/>
 <a href="sharing_models.html#Enum_GroupChildType">GroupChildType</a><br/>
 <a href="sharing_models.html#Struct_GroupMembership">GroupMembership</a><br/>
-<a href="sharing_models.html#Struct_GroupOwner">GroupOwner</a><br/>
 <a href="sharing_models.html#Enum_GroupType">GroupType</a><br/>
 <a href="sharing_models.html#Struct_PermissionType">PermissionType</a><br/>
 <a href="sharing_models.html#Enum_SearchCondition">SearchCondition</a><br/>
diff --git 
a/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html 
b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html
index c1e8058361..1a56fe2a8a 100644
--- a/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html
+++ b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html
@@ -19,7 +19,6 @@ <h1>Thrift module: sharing_models</h1>
 <a href="#Enum_GroupCardinality">GroupCardinality</a><br/>
 <a href="#Enum_GroupChildType">GroupChildType</a><br/>
 <a href="#Struct_GroupMembership">GroupMembership</a><br/>
-<a href="#Struct_GroupOwner">GroupOwner</a><br/>
 <a href="#Enum_GroupType">GroupType</a><br/>
 <a href="#Struct_PermissionType">PermissionType</a><br/>
 <a href="#Enum_SearchCondition">SearchCondition</a><br/>
@@ -175,11 +174,6 @@ <h1>Thrift module: sharing_models</h1>
 
<tr><td>1</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 
<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 
<tr><td>3</td><td>adminId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/></div><div class="definition"><h3 id="Struct_GroupOwner">Struct: 
GroupOwner</h3>
-<table class="table-bordered table-striped 
table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default
 value</th></thead>
-<tr><td>1</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>3</td><td>ownerId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 </table><br/></div><div class="definition"><h3 id="Struct_UserGroup">Struct: 
UserGroup</h3>
 <table class="table-bordered table-striped 
table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default
 value</th></thead>
 
<tr><td>1</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
diff --git a/modules/sharing-registry/thrift_models/sharing_models.thrift 
b/modules/sharing-registry/thrift_models/sharing_models.thrift
index 35c2db6d0a..bd0e5fe5cd 100644
--- a/modules/sharing-registry/thrift_models/sharing_models.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_models.thrift
@@ -77,17 +77,6 @@ struct GroupAdmin {
  3: optional string adminId
 }
 
-/*
-* The Owner who creates the group initially. Ownership can be transferable to 
a different user.
-* Only owners are allowed to delete the groups.
-*
-**/
-struct GroupOwner {
- 1: optional string groupId,
- 2: optional string domainId,
- 3: optional string ownerId
-}
-
 /**
 * <p>This is an system internal enum used to define single user groups and 
multi users groups. Every user is also
 * considered as a group in it's own right for implementation ease</p>


 

----------------------------------------------------------------
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:
[email protected]


> Add group roles capabilities to Groups 
> ---------------------------------------
>
>                 Key: AIRAVATA-2591
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2591
>             Project: Airavata
>          Issue Type: New Feature
>            Reporter: Suresh Marru
>            Assignee: Sachin Kariyattin
>
> Currently, the group members do not have fine-grained roles so only the owner 
> can add users to this group. 
> It will be better to add group-member-roles:
> * The owner who creates the group initially. This ownership should be 
> transferable to a different user. Only owners should be allowed to delete the 
> groups. 
> * admin - a user role which will allow to add more users or remove users from 
> the group. 
> * user - all users added to the group are by default in this role. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to