diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 1de81d5048b..aea6d206665 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -992a949c0146091c019744392eaffaaa19405a7a +7509a441f22277474a95dca141dc18bf6e1953be diff --git a/Gemfile b/Gemfile index a865ff10644..a202b13e78f 100644 --- a/Gemfile +++ b/Gemfile @@ -712,7 +712,7 @@ gem 'cvss-suite', '~> 3.0.1', require: 'cvss_suite' # rubocop:todo Gemfile/Missi gem 'arr-pm', '~> 0.0.12' # rubocop:todo Gemfile/MissingFeatureCategory # Remote Development -gem 'devfile', '~> 0.0.26.pre.alpha1', feature_category: :remote_development +gem 'devfile', '~> 0.0.26.pre.alpha1', feature_category: :workspaces # Apple plist parsing gem 'CFPropertyList', '~> 3.0.0' # rubocop:todo Gemfile/MissingFeatureCategory diff --git a/app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue b/app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue index 931cf39ecaa..96522fca2a7 100644 --- a/app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue +++ b/app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue @@ -91,6 +91,7 @@ export default { showStatusChecks: { default: false }, showApprovers: { default: false }, showCodeOwners: { default: false }, + canAdminProtectedBranches: { default: false }, }, apollo: { // eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties @@ -437,7 +438,7 @@ export default { :users="mergeAccessLevels.users" :groups="mergeAccessLevels.groups" :empty-state-copy="$options.i18n.allowedToMergeEmptyState" - is-edit-available + :is-edit-available="canAdminProtectedBranches" data-testid="allowed-to-merge-content" @edit="openAllowedToMergeDrawer" /> @@ -468,7 +469,7 @@ export default { :deploy-keys="pushAccessLevels.deployKeys" :empty-state-copy="$options.i18n.allowedToPushEmptyState" :help-text="$options.i18n.allowedToPushDescription" - is-edit-available + :is-edit-available="canAdminProtectedBranches" data-testid="allowed-to-push-content" @edit="openAllowedToPushAndMergeDrawer" /> diff --git a/app/assets/javascripts/projects/settings/branch_rules/components/view/protection_toggle.vue b/app/assets/javascripts/projects/settings/branch_rules/components/view/protection_toggle.vue index 10209e6520a..32190045981 100644 --- a/app/assets/javascripts/projects/settings/branch_rules/components/view/protection_toggle.vue +++ b/app/assets/javascripts/projects/settings/branch_rules/components/view/protection_toggle.vue @@ -16,6 +16,9 @@ export default { GlLink, }, mixins: [glFeatureFlagsMixin()], + inject: { + canAdminProtectedBranches: { default: false }, + }, props: { dataTestIdPrefix: { type: String, @@ -71,12 +74,15 @@ export default { return this.isProtected ? Boolean(this.description) : false; }, + canEditProtectionToggles() { + return this.canAdminProtectedBranches && this.glFeatures.editBranchRules; + }, }, };