airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-django-portal] 07/07: AIRAVATA-2835 Only allow owner to edit sharing settings
Date Fri, 13 Jul 2018 00:18:12 GMT
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 c579b8496022800aa6da135811cfa64136f7ab62
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Thu Jul 12 20:17:54 2018 -0400

    AIRAVATA-2835 Only allow owner to edit sharing settings
---
 django_airavata/static/common/js/components/ShareButton.vue | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/django_airavata/static/common/js/components/ShareButton.vue b/django_airavata/static/common/js/components/ShareButton.vue
index ff2e7a4..02edb02 100644
--- a/django_airavata/static/common/js/components/ShareButton.vue
+++ b/django_airavata/static/common/js/components/ShareButton.vue
@@ -1,6 +1,6 @@
 <template>
     <div id="share-button">
-        <b-button v-b-modal.modal-share-settings :variant="'outline-primary'" :title="title">
+        <b-button v-b-modal.modal-share-settings :variant="'outline-primary'" :title="title"
:disabled="!shareButtonEnabled">
             Share
             <b-badge>{{ totalCount }}</b-badge>
         </b-button>
@@ -163,7 +163,11 @@ export default {
         },
         usersAndGroupsSuggestions: function() {
             return this.userSuggestions.concat(this.groupSuggestions);
-        }
+        },
+        shareButtonEnabled: function() {
+            // Enable share button if new entity or user is the entity's owner
+            return (!this.sharedEntity.entityId || this.sharedEntity.isOwner);
+        },
     },
     methods: {
         /**


Mime
View raw message