You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/11/25 18:43:38 UTC
[airavata-django-portal] branch master updated (0370a9a -> 93e4908)
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git.
from 0370a9a AIRAVATA-3067 Apply most recently used resource profile, comput resource
new 85d0da0 AIRAVATA-3279 Check if user has READ access to project
new 93e4908 fix lint error
The 2 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:
django_airavata/apps/api/views.py | 8 +++++---
django_airavata/wagtailapps/base/wagtail_hooks.py | 3 ++-
2 files changed, 7 insertions(+), 4 deletions(-)
[airavata-django-portal] 01/02: AIRAVATA-3279 Check if user has
READ access to project
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 85d0da0b16f62f5b76ec37deae1d56425a91b524
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Nov 25 13:41:42 2019 -0500
AIRAVATA-3279 Check if user has READ access to project
---
django_airavata/apps/api/views.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/django_airavata/apps/api/views.py b/django_airavata/apps/api/views.py
index 23b4975..14ff2c3 100644
--- a/django_airavata/apps/api/views.py
+++ b/django_airavata/apps/api/views.py
@@ -15,7 +15,6 @@ from rest_framework.renderers import JSONRenderer
from rest_framework.response import Response
from rest_framework.views import APIView
-from airavata.api.error.ttypes import ProjectNotFoundException
from airavata.model.appcatalog.computeresource.ttypes import (
CloudJobSubmission,
GlobusJobSubmission,
@@ -505,10 +504,13 @@ class FullExperimentViewSet(mixins.RetrieveModelMixin,
log.exception("Failed to load compute resource for {}".format(
compute_resource_id))
compute_resource = None
- try:
+ if self.request.airavata_client.userHasAccess(
+ self.authz_token,
+ experimentModel.projectId,
+ ResourcePermissionType.READ):
project = self.request.airavata_client.getProject(
self.authz_token, experimentModel.projectId)
- except ProjectNotFoundException as pnfe:
+ else:
# User may not have access to project, only experiment
project = None
job_details = self.request.airavata_client.getJobDetails(
[airavata-django-portal] 02/02: fix lint error
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 93e490894c90b558163bf7fd46b7723bf3770d0a
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Nov 25 13:43:25 2019 -0500
fix lint error
---
django_airavata/wagtailapps/base/wagtail_hooks.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/django_airavata/wagtailapps/base/wagtail_hooks.py b/django_airavata/wagtailapps/base/wagtail_hooks.py
index 124f976..0f93542 100644
--- a/django_airavata/wagtailapps/base/wagtail_hooks.py
+++ b/django_airavata/wagtailapps/base/wagtail_hooks.py
@@ -2,8 +2,9 @@ import logging
import wagtail.admin.rich_text.editors.draftail.features as draftail_features
from django.shortcuts import redirect
-from wagtail.admin.rich_text.converters.html_to_contentstate import \
+from wagtail.admin.rich_text.converters.html_to_contentstate import (
InlineStyleElementHandler
+)
from wagtail.core import hooks
logger = logging.getLogger(__name__)