Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-21 15:13:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-21 15:13:58 +0300
commitc0a3d287c0d613cc439a31683d06dd70f3411f8c (patch)
tree67852660a05456dd7960453f33d7f60650a21cbc /app/assets/javascripts/token_access
parent0cb932429fb8b8d93d677f0f375f527e9d9a4c9b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/token_access')
-rw-r--r--app/assets/javascripts/token_access/components/token_access.vue20
1 files changed, 17 insertions, 3 deletions
diff --git a/app/assets/javascripts/token_access/components/token_access.vue b/app/assets/javascripts/token_access/components/token_access.vue
index 363a9d58d65..edfb708b425 100644
--- a/app/assets/javascripts/token_access/components/token_access.vue
+++ b/app/assets/javascripts/token_access/components/token_access.vue
@@ -1,5 +1,6 @@
<script>
import {
+ GlAlert,
GlButton,
GlCard,
GlFormInput,
@@ -25,6 +26,9 @@ export default {
`CICD|Select the projects that can be accessed by API requests authenticated with this project's CI_JOB_TOKEN CI/CD variable. It is a security risk to disable this feature, because unauthorized projects might attempt to retrieve an active token and access the API. %{linkStart}Learn more.%{linkEnd}`,
),
cardHeaderTitle: s__('CICD|Add an existing project to the scope'),
+ settingDisabledMessage: s__(
+ 'CICD|Enable feature to limit job token access to the following projects.',
+ ),
addProject: __('Add project'),
cancel: __('Cancel'),
addProjectPlaceholder: __('Paste project path (i.e. gitlab-org/gitlab)'),
@@ -32,6 +36,7 @@ export default {
scopeFetchError: __('There was a problem fetching the job token scope value'),
},
components: {
+ GlAlert,
GlButton,
GlCard,
GlFormInput,
@@ -195,8 +200,8 @@ export default {
</template>
</gl-toggle>
- <div data-testid="token-section">
- <gl-card class="gl-mt-5">
+ <div>
+ <gl-card class="gl-mt-5 gl-mb-3">
<template #header>
<h5 class="gl-my-0">{{ $options.i18n.cardHeaderTitle }}</h5>
</template>
@@ -213,7 +218,16 @@ export default {
<gl-button @click="clearTargetProjectPath">{{ $options.i18n.cancel }}</gl-button>
</template>
</gl-card>
-
+ <gl-alert
+ v-if="!jobTokenScopeEnabled"
+ class="gl-mb-3"
+ variant="warning"
+ :dismissible="false"
+ :show-icon="false"
+ data-testid="token-disabled-alert"
+ >
+ {{ $options.i18n.settingDisabledMessage }}
+ </gl-alert>
<token-projects-table :projects="projects" @removeProject="removeProject" />
</div>
</template>