Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {
},
components: {DetectIcon, GlDropdown, GlDropdownItem, GlDropdownDivider},
computed: {
...mapGetters(['getCurrentEnvironment', 'getDeploymentTemplate', 'getResourceSharedState', 'getHomeProjectPath', 'resolveResourceTypeFromAny']),
...mapGetters(['getCurrentEnvironment', 'getDeploymentTemplate', 'getResourceSharedState', 'getHomeProjectPath', 'resolveResourceTypeFromAny', 'getUser']),
canShareResource() {
/*
* don't require connect implementation, handled by Unfurl
Expand Down Expand Up @@ -47,6 +47,9 @@ export default {
return `Shared in <b>${this.getCurrentEnvironment.name}</b>.`
}
return ''
},
canPublish() {
return this.openCloudPublish && this.getUser?.external === false
}
},
methods: {
Expand Down Expand Up @@ -125,7 +128,7 @@ export default {
<div class="d-inline-flex">Share in current environment</div>
</gl-dropdown-item>
<gl-dropdown-item v-if="sharedStatus != 'dashboard'" @click="shareWithDashboard">Share with all environments</gl-dropdown-item>
<gl-dropdown-item v-if="openCloudPublish" @click="sharePublic">Share publically</gl-dropdown-item>
<gl-dropdown-item v-if="canPublish" @click="sharePublic">Share publically</gl-dropdown-item>
<gl-dropdown-item v-if="sharedStatus" @click="stopSharing">Stop sharing <b>{{card.title}}</b></gl-dropdown-item>
</gl-dropdown>
</template>