diff --git a/.rubocop.yml b/.rubocop.yml
index 6d2ade9e1ed..eac0d2748ae 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -276,6 +276,12 @@ GitlabSecurity/PublicSend:
Gitlab/DuplicateSpecLocation:
Enabled: true
+Gitlab/PolicyRuleBoolean:
+ Enabled: true
+ Include:
+ - 'app/policies/**/*'
+ - 'ee/app/policies/**/*'
+
Cop/InjectEnterpriseEditionModule:
Enabled: true
Exclude:
diff --git a/.rubocop_manual_todo.yml b/.rubocop_manual_todo.yml
index ef316e8b08f..1bdc83fc902 100644
--- a/.rubocop_manual_todo.yml
+++ b/.rubocop_manual_todo.yml
@@ -41,6 +41,10 @@ Graphql/ResolverType:
- 'app/graphql/resolvers/users/group_count_resolver.rb'
- 'ee/app/graphql/resolvers/vulnerabilities_base_resolver.rb'
+Gitlab/PolicyRuleBoolean:
+ Exclude:
+ - 'ee/app/policies/ee/identity_provider_policy.rb'
+
Rails/SaveBang:
Exclude:
- 'ee/spec/controllers/projects/merge_requests_controller_spec.rb'
diff --git a/app/assets/javascripts/filtered_search/add_extra_tokens_for_merge_requests.js b/app/assets/javascripts/filtered_search/add_extra_tokens_for_merge_requests.js
index 8899870be79..38a5bdd4a71 100644
--- a/app/assets/javascripts/filtered_search/add_extra_tokens_for_merge_requests.js
+++ b/app/assets/javascripts/filtered_search/add_extra_tokens_for_merge_requests.js
@@ -1,6 +1,18 @@
import { __ } from '~/locale';
export default (IssuableTokenKeys, disableTargetBranchFilter = false) => {
+ const reviewerToken = {
+ formattedKey: __('Reviewer'),
+ key: 'reviewer',
+ type: 'string',
+ param: 'username',
+ symbol: '@',
+ icon: 'user',
+ tag: '@reviewer',
+ };
+ IssuableTokenKeys.tokenKeys.splice(2, 0, reviewerToken);
+ IssuableTokenKeys.tokenKeysWithAlternative.splice(2, 0, reviewerToken);
+
const draftToken = {
token: {
formattedKey: __('Draft'),
diff --git a/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js b/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js
index 6e742e4ca02..f9388e9c5d8 100644
--- a/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js
+++ b/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js
@@ -21,15 +21,6 @@ export const tokenKeys = [
icon: 'user',
tag: '@assignee',
},
- {
- formattedKey: __('Reviewer'),
- key: 'reviewer',
- type: 'string',
- param: 'username',
- symbol: '@',
- icon: 'user',
- tag: '@reviewer',
- },
{
formattedKey: __('Milestone'),
key: 'milestone',
diff --git a/app/assets/javascripts/groups/components/visibility_level_dropdown.vue b/app/assets/javascripts/groups/components/visibility_level_dropdown.vue
new file mode 100644
index 00000000000..ff0f8c3ff46
--- /dev/null
+++ b/app/assets/javascripts/groups/components/visibility_level_dropdown.vue
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+ {{ option.label }}
+
+
+
+
diff --git a/app/assets/javascripts/groups/visibility_level.js b/app/assets/javascripts/groups/visibility_level.js
new file mode 100644
index 00000000000..d570b5e65ac
--- /dev/null
+++ b/app/assets/javascripts/groups/visibility_level.js
@@ -0,0 +1,24 @@
+import Vue from 'vue';
+import VisibilityLevelDropdown from './components/visibility_level_dropdown.vue';
+
+export default () => {
+ const el = document.querySelector('.js-visibility-level-dropdown');
+
+ if (!el) {
+ return null;
+ }
+
+ const { visibilityLevelOptions, defaultLevel } = el.dataset;
+
+ return new Vue({
+ el,
+ render(createElement) {
+ return createElement(VisibilityLevelDropdown, {
+ props: {
+ visibilityLevelOptions: JSON.parse(visibilityLevelOptions),
+ defaultLevel: Number(defaultLevel),
+ },
+ });
+ },
+ });
+};
diff --git a/app/assets/javascripts/registry/explorer/graphql/mutations/delete_container_repository.graphql b/app/assets/javascripts/registry/explorer/graphql/mutations/delete_container_repository.mutation.graphql
similarity index 100%
rename from app/assets/javascripts/registry/explorer/graphql/mutations/delete_container_repository.graphql
rename to app/assets/javascripts/registry/explorer/graphql/mutations/delete_container_repository.mutation.graphql
diff --git a/app/assets/javascripts/registry/explorer/graphql/mutations/delete_container_repository_tags.graphql b/app/assets/javascripts/registry/explorer/graphql/mutations/delete_container_repository_tags.mutation.graphql
similarity index 100%
rename from app/assets/javascripts/registry/explorer/graphql/mutations/delete_container_repository_tags.graphql
rename to app/assets/javascripts/registry/explorer/graphql/mutations/delete_container_repository_tags.mutation.graphql
diff --git a/app/assets/javascripts/registry/explorer/graphql/queries/get_container_repository_details.graphql b/app/assets/javascripts/registry/explorer/graphql/queries/get_container_repository_details.query.graphql
similarity index 100%
rename from app/assets/javascripts/registry/explorer/graphql/queries/get_container_repository_details.graphql
rename to app/assets/javascripts/registry/explorer/graphql/queries/get_container_repository_details.query.graphql
diff --git a/app/assets/javascripts/registry/explorer/graphql/queries/get_group_container_repositories.graphql b/app/assets/javascripts/registry/explorer/graphql/queries/get_group_container_repositories.query.graphql
similarity index 92%
rename from app/assets/javascripts/registry/explorer/graphql/queries/get_group_container_repositories.graphql
rename to app/assets/javascripts/registry/explorer/graphql/queries/get_group_container_repositories.query.graphql
index a3bafef15d9..348eda97ea7 100644
--- a/app/assets/javascripts/registry/explorer/graphql/queries/get_group_container_repositories.graphql
+++ b/app/assets/javascripts/registry/explorer/graphql/queries/get_group_container_repositories.query.graphql
@@ -1,7 +1,7 @@
#import "~/graphql_shared/fragments/pageInfo.fragment.graphql"
#import "../fragments/container_repository.fragment.graphql"
-query getProjectContainerRepositories(
+query getGroupContainerRepositories(
$fullPath: ID!
$name: String
$first: Int
diff --git a/app/assets/javascripts/registry/explorer/graphql/queries/get_project_container_repositories.graphql b/app/assets/javascripts/registry/explorer/graphql/queries/get_project_container_repositories.query.graphql
similarity index 100%
rename from app/assets/javascripts/registry/explorer/graphql/queries/get_project_container_repositories.graphql
rename to app/assets/javascripts/registry/explorer/graphql/queries/get_project_container_repositories.query.graphql
diff --git a/app/assets/javascripts/registry/explorer/pages/details.vue b/app/assets/javascripts/registry/explorer/pages/details.vue
index 57c59c7dc42..540f02d58d4 100644
--- a/app/assets/javascripts/registry/explorer/pages/details.vue
+++ b/app/assets/javascripts/registry/explorer/pages/details.vue
@@ -12,8 +12,8 @@ import TagsList from '../components/details_page/tags_list.vue';
import TagsLoader from '../components/details_page/tags_loader.vue';
import EmptyTagsState from '../components/details_page/empty_tags_state.vue';
-import getContainerRepositoryDetailsQuery from '../graphql/queries/get_container_repository_details.graphql';
-import deleteContainerRepositoryTagsMutation from '../graphql/mutations/delete_container_repository_tags.graphql';
+import getContainerRepositoryDetailsQuery from '../graphql/queries/get_container_repository_details.query.graphql';
+import deleteContainerRepositoryTagsMutation from '../graphql/mutations/delete_container_repository_tags.mutation.graphql';
import {
ALERT_SUCCESS_TAG,
diff --git a/app/assets/javascripts/registry/explorer/pages/list.vue b/app/assets/javascripts/registry/explorer/pages/list.vue
index ce27b990013..3192ba82db8 100644
--- a/app/assets/javascripts/registry/explorer/pages/list.vue
+++ b/app/assets/javascripts/registry/explorer/pages/list.vue
@@ -18,9 +18,9 @@ import RegistryHeader from '../components/list_page/registry_header.vue';
import ImageList from '../components/list_page/image_list.vue';
import CliCommands from '../components/list_page/cli_commands.vue';
-import getProjectContainerRepositories from '../graphql/queries/get_project_container_repositories.graphql';
-import getGroupContainerRepositories from '../graphql/queries/get_group_container_repositories.graphql';
-import deleteContainerRepository from '../graphql/mutations/delete_container_repository.graphql';
+import getProjectContainerRepositoriesQuery from '../graphql/queries/get_project_container_repositories.query.graphql';
+import getGroupContainerRepositoriesQuery from '../graphql/queries/get_group_container_repositories.query.graphql';
+import deleteContainerRepositoryMutation from '../graphql/mutations/delete_container_repository.mutation.graphql';
import {
DELETE_IMAGE_SUCCESS_MESSAGE,
@@ -111,8 +111,8 @@ export default {
},
graphQlQuery() {
return this.config.isGroupPage
- ? getGroupContainerRepositories
- : getProjectContainerRepositories;
+ ? getGroupContainerRepositoriesQuery
+ : getProjectContainerRepositoriesQuery;
},
queryVariables() {
return {
@@ -152,7 +152,7 @@ export default {
this.mutationLoading = true;
return this.$apollo
.mutate({
- mutation: deleteContainerRepository,
+ mutation: deleteContainerRepositoryMutation,
variables: {
id: this.itemToDelete.id,
},
diff --git a/app/assets/javascripts/registry/settings/components/registry_settings_app.vue b/app/assets/javascripts/registry/settings/components/registry_settings_app.vue
index ac6a0871153..35c7a8be4ea 100644
--- a/app/assets/javascripts/registry/settings/components/registry_settings_app.vue
+++ b/app/assets/javascripts/registry/settings/components/registry_settings_app.vue
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+ {{ $options.i18n.upgradeToInteract }}
+ {{
+ __('Learn more')
+ }}
+
+
+
+
+
+
+
diff --git a/app/assets/javascripts/vue_shared/security_reports/security_reports_app.vue b/app/assets/javascripts/vue_shared/security_reports/security_reports_app.vue
index 3f4a790d24e..bdbf9957ad4 100644
--- a/app/assets/javascripts/vue_shared/security_reports/security_reports_app.vue
+++ b/app/assets/javascripts/vue_shared/security_reports/security_reports_app.vue
@@ -1,6 +1,6 @@