private void addUserGroupsToUserGroupList(BasePermissionsHelper permissionsHelper,String domain,StorageOSUserDAO storageOSUser){
  if (StringUtils.isBlank(domain)) {
    _log.error("Invalid domain {} to search user group",domain);
    return;
  }
  List<UserGroup> userGroupList=permissionsHelper.getAllUserGroupForDomain(domain);
  if (CollectionUtils.isEmpty(userGroupList)) {
    _log.debug("Cannot find user mappings for the domain {}",domain);
    return;
  }
  for (  UserGroup userGroup : userGroupList) {
    if (userGroup != null) {
      if (permissionsHelper.matchUserAttributesToUserGroup(storageOSUser,userGroup)) {
        _log.debug("Adding user group {} to the user",userGroup.getLabel());
        storageOSUser.addGroup(userGroup.getLabel());
      }
    }
 else {
      _log.info("Invalid user group returned while searching db with domain {}",domain);
    }
  }
}

private void addUserGroupsToUserGroupList ( BasePermissionsHelper permissionsHelper , String domain , StorageOSUserDAO storageOSUser ) { if ( StringUtils . isBlank ( domain ) ) { _log . error ( "Invalid domain {} to search user group" , domain ) ; return ; } List < UserGroup > userGroupList = permissionsHelper . getAllUserGroupForDomain ( domain ) ; if ( CollectionUtils . isEmpty ( userGroupList ) ) { _log . debug ( "Cannot find user mappings for the domain {}" , domain ) ; return ; } for ( UserGroup userGroup : userGroupList ) { if ( userGroup != null ) { if ( permissionsHelper . matchUserAttributesToUserGroup ( storageOSUser , userGroup ) ) { _log . debug ( "Adding user group {} to the user" , userGroup . getLabel ( ) ) ; storageOSUser . addGroup ( userGroup . getLabel ( ) ) ; } } else { _log . info ( "Invalid user group returned while searching db with domain {}" , domain ) ; } } }
add the user group to the storageos user ' s group list if the storageos user ' s attributes and values matches with the user group configs .
