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 2018/11/19 21:30:14 UTC

[airavata-django-portal] branch master updated (7e6243d -> 20e0469)

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 7e6243d  AIRAVATA-2931 Don't allow owner to be removed from group
     new 885de30  Remove gateway id from owner username
     new 237099f  remove .editorconfig from admin app
     new 20e0469  Don't allow non admin users to create applications

The 3 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/admin/.editorconfig                         | 9 ---------
 django_airavata/apps/admin/templates/admin/admin_base.html       | 2 ++
 django_airavata/apps/admin/views.py                              | 5 ++++-
 .../django_airavata_groups/js/group_components/GroupListItem.vue | 9 ++++++++-
 4 files changed, 14 insertions(+), 11 deletions(-)
 delete mode 100644 django_airavata/apps/admin/.editorconfig


[airavata-django-portal] 03/03: Don't allow non admin users to create applications

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 20e04698adfe4c32b5c0cd08dd1c8ac3780fd945
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Mon Nov 19 15:56:03 2018 -0500

    Don't allow non admin users to create applications
---
 django_airavata/apps/admin/templates/admin/admin_base.html | 2 ++
 django_airavata/apps/admin/views.py                        | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/django_airavata/apps/admin/templates/admin/admin_base.html b/django_airavata/apps/admin/templates/admin/admin_base.html
index 6cf7e9d..9870592 100644
--- a/django_airavata/apps/admin/templates/admin/admin_base.html
+++ b/django_airavata/apps/admin/templates/admin/admin_base.html
@@ -9,9 +9,11 @@
  {% endblock %}
 {% block nav-items %}
 
+        {% if request.is_gateway_admin or request.is_read_only_gateway_admin %}
         <a href="{% url 'django_airavata_admin:app_catalog' %}" class="c-nav__item {% if request.active_nav_item == 'app_catalog' %}is-active{% endif %}" data-toggle=tooltip data-placement=right title="Application Catalog">
             <i class="fa fa-cogs"></i> <span class=sr-only>Application Catalog</span>
         </a>
+        {% endif %}
         <a href="{% url 'django_airavata_admin:credential_store' %}" class="c-nav__item {% if request.active_nav_item == 'credential_store' %}is-active{% endif %}" data-toggle=tooltip data-placement=right title="Credential Store">
             <i class="fa fa-lock"></i> <span class=sr-only>Credential Store</span>
         </a>
diff --git a/django_airavata/apps/admin/views.py b/django_airavata/apps/admin/views.py
index 68582d4..58c94d0 100644
--- a/django_airavata/apps/admin/views.py
+++ b/django_airavata/apps/admin/views.py
@@ -5,7 +5,10 @@ from django.urls import reverse
 
 @login_required
 def home(request):
-    return redirect(reverse('django_airavata_admin:app_catalog'))
+    if request.is_gateway_admin or request.is_read_only_gateway_admin:
+        return redirect(reverse('django_airavata_admin:app_catalog'))
+    else:
+        return redirect(reverse('django_airavata_admin:group_resource_profile'))
 
 
 @login_required


[airavata-django-portal] 01/03: Remove gateway id from owner username

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 885de3025bb1581852150f775512c4f93bed6d81
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Mon Nov 19 15:30:24 2018 -0500

    Remove gateway id from owner username
---
 .../django_airavata_groups/js/group_components/GroupListItem.vue | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupListItem.vue b/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupListItem.vue
index c8de521..518fd1b 100644
--- a/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupListItem.vue
+++ b/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupListItem.vue
@@ -5,7 +5,7 @@
             <b-badge v-if="group.isReadOnlyGatewayAdminsGroup">Read Only Admins</b-badge>
             <b-badge v-if="group.isDefaultGatewayUsersGroup">Default</b-badge>
         </td>
-        <td>{{ group.ownerId }}</td>
+        <td>{{ ownerUsername }}</td>
         <td>{{ group.description }}</td>
         <td>
             <a v-if="group.isOwner || group.isAdmin"
@@ -53,6 +53,13 @@ export default {
                 && this.group.isGatewayAdminsGroup === false
                 && this.group.isReadOnlyGatewayAdminsGroup === false
                 && this.group.isDefaultGatewayUsersGroup === false;
+        },
+        ownerUsername() {
+          const lastAtIndex = this.group.ownerId.lastIndexOf("@");
+          if (lastAtIndex > 0) {
+            return this.group.ownerId.substring(0, lastAtIndex);
+          }
+          return this.group.ownerId;
         }
     },
     methods: {


[airavata-django-portal] 02/03: remove .editorconfig from admin app

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 237099fd913dfc2a13e84ce10c4b69eab1080e10
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Mon Nov 19 15:55:40 2018 -0500

    remove .editorconfig from admin app
---
 django_airavata/apps/admin/.editorconfig | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/django_airavata/apps/admin/.editorconfig b/django_airavata/apps/admin/.editorconfig
deleted file mode 100644
index 9d08a1a..0000000
--- a/django_airavata/apps/admin/.editorconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-root = true
-
-[*]
-charset = utf-8
-indent_style = space
-indent_size = 2
-end_of_line = lf
-insert_final_newline = true
-trim_trailing_whitespace = true