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>2023-09-20 09:11:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-20 09:11:22 +0300
commit13ad005a25f163520ff94b90cdd53495c5a0b5c4 (patch)
tree5b2fb4262633c200a8e701de2d1fa97105641ed2 /lib/api/helpers.rb
parent9a61b4604efea1c8e57f4c90addbc94ecbe874de (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index e967b88e500..9e04cf955df 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -19,7 +19,7 @@ module API
API_TOKEN_ENV = 'gitlab.api.token'
API_EXCEPTION_ENV = 'gitlab.api.exception'
API_RESPONSE_STATUS_CODE = 'gitlab.api.response_status_code'
- INTEGER_ID_REGEX = /^-?\d+$/.freeze
+ INTEGER_ID_REGEX = /^-?\d+$/
def logger
API.logger
@@ -237,7 +237,7 @@ module API
end
def check_namespace_access(namespace)
- return namespace if can?(current_user, :read_namespace, namespace)
+ return namespace if can?(current_user, :read_namespace_via_membership, namespace)
not_found!('Namespace')
end