[airavata-django-portal-sdk] branch mft-integration updated: AIRAVATA-3420 Pass experiment owner to user storage provider backend

2021-05-19 Thread machristie
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch mft-integration
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal-sdk.git


The following commit(s) were added to refs/heads/mft-integration by this push:
 new 4a981ae  AIRAVATA-3420 Pass experiment owner to user storage provider 
backend
4a981ae is described below

commit 4a981ae259ce8e275b01f476b27619759f59212f
Author: Marcus Christie 
AuthorDate: Wed May 19 17:22:46 2021 -0400

AIRAVATA-3420 Pass experiment owner to user storage provider backend
---
 airavata_django_portal_sdk/user_storage/api.py | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/airavata_django_portal_sdk/user_storage/api.py 
b/airavata_django_portal_sdk/user_storage/api.py
index c145e87..bfdd9c0 100644
--- a/airavata_django_portal_sdk/user_storage/api.py
+++ b/airavata_django_portal_sdk/user_storage/api.py
@@ -546,11 +546,11 @@ def list_experiment_dir(request, experiment_id, path="", 
storage_resource_id=Non
 
 experiment = request.airavata_client.getExperiment(
 request.authz_token, experiment_id)
-backend = get_user_storage_provider(request, 
storage_resource_id=storage_resource_id)
+backend = get_user_storage_provider(request,
+
storage_resource_id=storage_resource_id,
+owner_username=experiment.userName)
 exp_data_dir = experiment.userConfigurationData.experimentDataDir
 exp_data_path = os.path.join(exp_data_dir, path)
-# Implement username override with exp_owner
-# exp_owner = experiment.userName
 if backend.exists(exp_data_path):
 directories, files = backend.get_metadata(exp_data_path)
 for directory in directories:
@@ -561,7 +561,7 @@ def list_experiment_dir(request, experiment_id, path="", 
storage_resource_id=Non
 for file in files:
 data_product_uri = _get_data_product_uri(request, 
file['resource_path'],
  
storage_resource_id=backend.resource_id,
- backend=backend)
+ backend=backend, 
owner=experiment.userName)
 
 data_product = request.airavata_client.getDataProduct(
 request.authz_token, data_product_uri)
@@ -597,9 +597,9 @@ def experiment_dir_exists(request, experiment_id, path="", 
storage_resource_id=N
 exp_data_path = experiment.userConfigurationData.experimentDataDir
 if exp_data_path is None:
 return False
-# Implement username overide with exp_owner
-# exp_owner = experiment.userName
-backend = get_user_storage_provider(request, 
storage_resource_id=storage_resource_id)
+backend = get_user_storage_provider(request,
+
storage_resource_id=storage_resource_id,
+owner_username=experiment.userName)
 return backend.exists(exp_data_path)
 
 


[airavata-custos] branch develop updated: Fix for issue 142

2021-05-19 Thread isjarana
This is an automated email from the ASF dual-hosted git repository.

isjarana pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git


The following commit(s) were added to refs/heads/develop by this push:
 new ec860f2  Fix for issue 142
 new be77618  Merge pull request #165 from isururanawaka/refactor_develop
ec860f2 is described below

commit ec860f2f4fce5717778c1c83b4c901db1794fabc
Author: Isuru Ranawaka 
AuthorDate: Wed May 19 12:26:02 2021 -0400

Fix for issue 142
---
 .../respository/SearchTenantRepositoryImpl.java|  16 +++-
 .../profile/service/TenantProfileService.java  |  16 +---
 .../src/main/proto/TenantProfileService.proto  |  13 +++--
 .../main/resources/tenant-management-service.pb| Bin 151021 -> 151075 bytes
 4 files changed, 23 insertions(+), 22 deletions(-)

diff --git 
a/custos-core-services/tenant-profile-core-service/src/main/java/org/apache/custos/tenant/profile/persistance/respository/SearchTenantRepositoryImpl.java
 
b/custos-core-services/tenant-profile-core-service/src/main/java/org/apache/custos/tenant/profile/persistance/respository/SearchTenantRepositoryImpl.java
index 54707a0..470f720 100644
--- 
a/custos-core-services/tenant-profile-core-service/src/main/java/org/apache/custos/tenant/profile/persistance/respository/SearchTenantRepositoryImpl.java
+++ 
b/custos-core-services/tenant-profile-core-service/src/main/java/org/apache/custos/tenant/profile/persistance/respository/SearchTenantRepositoryImpl.java
@@ -60,22 +60,36 @@ public class SearchTenantRepositoryImpl implements 
SearchTenantRepository {
 if (requestEmail != null && !requestEmail.isEmpty()) {
 query = query + "E.requester_email = :" + "requester_email" + " 
AND ";
 valueMap.put("requester_email", requestEmail);
+
 }
 
 if (status != null && !status.isEmpty()) {
 query = query + "E.status LIKE :" + "status" + " AND ";
 valueMap.put("status", status);
+
 }
 
 if (parentId > 0) {
 query = query + "E.parent_id = :" + "parent_id" + " AND ";
 valueMap.put("parent_id", parentId);
+
+}
+
+if ((requestEmail == null || requestEmail.isEmpty()) && (status == 
null || status.isEmpty()) && parentId == 0) {
+String directQuery = "SELECT * FROM tenant E ORDER BY E.created_at 
DESC";
+if (limit > 0) {
+directQuery = directQuery + " LIMIT " + ":limit" + " OFFSET " 
+ ":offset";
+valueMap.put("limit", limit);
+valueMap.put("offset", offset);
+}
+return directQuery;
 }
 
 query = query.substring(0, query.length() - 5);
 
 query = query + " ORDER BY E.created_at DESC";
-if (offset > 0 & limit > 0) {
+
+if (limit > 0) {
 query = query + " LIMIT " + ":limit" + " OFFSET " + ":offset";
 valueMap.put("limit", limit);
 valueMap.put("offset", offset);
diff --git 
a/custos-core-services/tenant-profile-core-service/src/main/java/org/apache/custos/tenant/profile/service/TenantProfileService.java
 
b/custos-core-services/tenant-profile-core-service/src/main/java/org/apache/custos/tenant/profile/service/TenantProfileService.java
index f3081ed..223182f 100644
--- 
a/custos-core-services/tenant-profile-core-service/src/main/java/org/apache/custos/tenant/profile/service/TenantProfileService.java
+++ 
b/custos-core-services/tenant-profile-core-service/src/main/java/org/apache/custos/tenant/profile/service/TenantProfileService.java
@@ -164,7 +164,7 @@ public class TenantProfileService extends 
TenantProfileServiceImplBase {
 
 String status = null;
 
-if (request.getStatus() != null && 
!request.getStatus().name().equals("")) {
+if (!request.getStatus().equals(TenantStatus.UNKNOWN)) {
 status = request.getStatus().name();
 }
 
@@ -177,20 +177,6 @@ public class TenantProfileService extends 
TenantProfileServiceImplBase {
 List tenants = null;
 List total_tenants = null;
 
-//if (status == null && requesterEmail != null && 
!requesterEmail.equals("")) {
-//  tenants = 
tenantRepository.findByRequesterEmail(requesterEmail);
-//} else if(status != null && requesterEmail != null && 
!requesterEmail.equals("")) {
-//tenants = 
tenantRepository.findByRequesterEmailAndStatus(requesterEmail, status);
-//} else if (status == null && parentId == 0) {
-//tenants = tenantRepository.getAllWithPaginate(limit,offset);
-//} else if (status != null && parentId == 0){
-//tenants = 
tenantRepository.findByStatusWithPaginate(status,limit,offset);
-//} else if (status == null && parentId > 0) {
-//tenants = 

[airavata-site] 01/01: Merge pull request #8 from apache/asf-staging

2021-05-19 Thread smarru
This is an automated email from the ASF dual-hosted git repository.

smarru pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/airavata-site.git

commit 8b0bf4f2f27b7b82408fb9539e5f82bb7399332c
Merge: e8fbbda 72a1ec9
Author: Suresh Marru 
AuthorDate: Wed May 19 10:55:56 2021 -0400

Merge pull request #8 from apache/asf-staging

adding yaml file to configure stagin

 .asf.yaml | 51 +++
 1 file changed, 51 insertions(+)


[airavata-site] branch asf-site updated (e8fbbda -> 8b0bf4f)

2021-05-19 Thread smarru
This is an automated email from the ASF dual-hosted git repository.

smarru pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/airavata-site.git.


from e8fbbda  updates affiliations
 add 72a1ec9  adding yaml file to configure stagin
 new 8b0bf4f  Merge pull request #8 from apache/asf-staging

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .asf.yaml | 51 +++
 1 file changed, 51 insertions(+)
 create mode 100644 .asf.yaml


[airavata-site] branch asf-staging created (now 72a1ec9)

2021-05-19 Thread smarru
This is an automated email from the ASF dual-hosted git repository.

smarru pushed a change to branch asf-staging
in repository https://gitbox.apache.org/repos/asf/airavata-site.git.


  at 72a1ec9  adding yaml file to configure stagin

This branch includes the following new commits:

 new 72a1ec9  adding yaml file to configure stagin

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[airavata-site] 01/01: adding yaml file to configure stagin

2021-05-19 Thread smarru
This is an automated email from the ASF dual-hosted git repository.

smarru pushed a commit to branch asf-staging
in repository https://gitbox.apache.org/repos/asf/airavata-site.git

commit 72a1ec91f429918190118e1dad72549c83a351ed
Author: Suresh Marru 
AuthorDate: Wed May 19 10:51:49 2021 -0400

adding yaml file to configure stagin
---
 .asf.yaml | 51 +++
 1 file changed, 51 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 000..c8226e7
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,51 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+notifications:
+  commits:  commits@airavata.apache.org
+  # Send all issue emails (new, closed, comments) to issues@
+  issues:   iss...@airavata.apache.org
+  # Send new/closed PR notifications to dev@
+  pullrequests_status:  iss...@airavata.apache.org
+  # Send individual PR comments/reviews to issues@
+  pullrequests_comment: iss...@airavata.apache.org
+
+github:
+  description: "Apache Airavata Website"
+  homepage: https://airavata.apache.org/
+  labels:
+- airavata
+- apache
+- security
+- oauth2
+- openidconnect
+- authentication
+- authorization
+
+  features:
+wiki: false
+issues: true
+projects: true
+
+staging:
+  profile: ~
+  whoami:  asf-staging
+ 
+ 
+publish:
+  whoami:  asf-site
\ No newline at end of file