summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/deploy_keys
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-01-05 15:23:44 +0000
committerStan Hu <stanhu@gmail.com>2018-01-16 17:04:51 -0800
commit536a47b4b70df0f2a8438ed0ada7654593fa5cd0 (patch)
tree709e6cb2c25b4e92d4ce6570f053c6083a4dceab /app/assets/javascripts/deploy_keys
parent3fc0564ae09a9edf87a71a8c85ff9bf8ad35121d (diff)
downloadgitlab-ce-536a47b4b70df0f2a8438ed0ada7654593fa5cd0.tar.gz
Merge branch 'sh-migrate-can-push-to-deploy-keys-projects-10-3' into 'security-10-3'
[10.3] Migrate `can_push` column from `keys` to `deploy_keys_project` See merge request gitlab/gitlabhq!2276 (cherry picked from commit f6ca52d31bac350a23938e0aebf717c767b4710c) 1f2bd3c0 Backport to 10.3
Diffstat (limited to 'app/assets/javascripts/deploy_keys')
-rw-r--r--app/assets/javascripts/deploy_keys/components/key.vue38
1 files changed, 31 insertions, 7 deletions
diff --git a/app/assets/javascripts/deploy_keys/components/key.vue b/app/assets/javascripts/deploy_keys/components/key.vue
index a9e819b8a3c..8211ba280c5 100644
--- a/app/assets/javascripts/deploy_keys/components/key.vue
+++ b/app/assets/javascripts/deploy_keys/components/key.vue
@@ -1,6 +1,10 @@
<script>
import actionBtn from './action_btn.vue';
+<<<<<<< HEAD
import { getTimeago } from '../../lib/utils/datetime_utility';
+=======
+ import tooltip from '../../vue_shared/directives/tooltip';
+>>>>>>> Merge branch 'sh-migrate-can-push-to-deploy-keys-projects-10-3' into 'security-10-3'
export default {
components: {
@@ -20,6 +24,15 @@
required: true,
},
},
+<<<<<<< HEAD
+=======
+ directives: {
+ tooltip,
+ },
+ components: {
+ actionBtn,
+ },
+>>>>>>> Merge branch 'sh-migrate-can-push-to-deploy-keys-projects-10-3' into 'security-10-3'
computed: {
timeagoDate() {
return getTimeago().format(this.deployKey.created_at);
@@ -32,6 +45,9 @@
isEnabled(id) {
return this.store.findEnabledKey(id) !== undefined;
},
+ tooltipTitle(project) {
+ return project.can_push ? 'Write access allowed' : 'Read access only';
+ },
},
};
</script>
@@ -52,21 +68,29 @@
<div class="description">
{{ deployKey.fingerprint }}
</div>
- <div
- v-if="deployKey.can_push"
- class="write-access-allowed"
- >
- Write access allowed
- </div>
</div>
<div class="deploy-key-content prepend-left-default deploy-key-projects">
<a
+<<<<<<< HEAD
v-for="(project, i) in deployKey.projects"
class="label deploy-project-label"
:href="project.full_path"
:key="i"
+=======
+ v-for="deployKeysProject in deployKey.deploy_keys_projects"
+ class="label deploy-project-label"
+ :href="deployKeysProject.project.full_path"
+ :title="tooltipTitle(deployKeysProject)"
+ v-tooltip
+>>>>>>> Merge branch 'sh-migrate-can-push-to-deploy-keys-projects-10-3' into 'security-10-3'
>
- {{ project.full_name }}
+ {{ deployKeysProject.project.full_name }}
+ <i
+ v-if="!deployKeysProject.can_push"
+ aria-hidden="true"
+ class="fa fa-lock"
+ >
+ </i>
</a>
</div>
<div class="deploy-key-content">