summaryrefslogtreecommitdiff
path: root/lib/gitlab
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-15 09:17:01 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-15 09:17:01 +0000
commite7e44c0e4ce493bb103b0fd98f8dd3c90928d291 (patch)
tree3145dea916e51dac9adcfd3d4639eaf27efe0f1e /lib/gitlab
parent66fc7ba6f3a4a8e74529192f1dd110d87a91fdfb (diff)
downloadgitlab-ce-e7e44c0e4ce493bb103b0fd98f8dd3c90928d291.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/access.rb8
-rw-r--r--lib/gitlab/checks/branch_check.rb1
-rw-r--r--lib/gitlab/project_authorizations.rb2
3 files changed, 8 insertions, 3 deletions
diff --git a/lib/gitlab/access.rb b/lib/gitlab/access.rb
index 3e09d488bc3..d0b426aeb60 100644
--- a/lib/gitlab/access.rb
+++ b/lib/gitlab/access.rb
@@ -33,7 +33,13 @@ module Gitlab
MAINTAINER_SUBGROUP_ACCESS = 1
class << self
- delegate :values, to: :options
+ def values
+ if ::Feature.enabled?(:personal_project_owner_with_owner_access, default_enabled: :yaml)
+ options_with_owner.values
+ else
+ options.values
+ end
+ end
def all_values
options_with_owner.values
diff --git a/lib/gitlab/checks/branch_check.rb b/lib/gitlab/checks/branch_check.rb
index 237a6bbb0f2..e8f13a92ee7 100644
--- a/lib/gitlab/checks/branch_check.rb
+++ b/lib/gitlab/checks/branch_check.rb
@@ -41,7 +41,6 @@ module Gitlab
def prohibited_branch_checks
return if deletion?
- return unless Feature.enabled?(:prohibit_hexadecimal_branch_names, project, default_enabled: true)
if branch_name =~ /\A\h{40}\z/
raise GitAccess::ForbiddenError, ERROR_MESSAGES[:prohibited_hex_branch_name]
diff --git a/lib/gitlab/project_authorizations.rb b/lib/gitlab/project_authorizations.rb
index 121626ced56..1d7b179baf0 100644
--- a/lib/gitlab/project_authorizations.rb
+++ b/lib/gitlab/project_authorizations.rb
@@ -22,7 +22,7 @@ module Gitlab
user.projects_with_active_memberships.select_for_project_authorization,
# The personal projects of the user.
- user.personal_projects.select_as_maintainer_for_project_authorization,
+ user.personal_projects.select_project_owner_for_project_authorization,
# Projects that belong directly to any of the groups the user has
# access to.