summaryrefslogtreecommitdiff
path: root/app/controllers/import/bitbucket_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-01 12:17:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-01 12:17:40 +0000
commit5e98d2784081393aea84b6591116d905da6eb567 (patch)
treef18117de3f067c2511861c3d2343b7c951032dae /app/controllers/import/bitbucket_controller.rb
parent2655540094e856f3048fb737a19e4316d8264623 (diff)
downloadgitlab-ce-5e98d2784081393aea84b6591116d905da6eb567.tar.gz
Add latest changes from gitlab-org/security/gitlab@15-10-stable-ee
Diffstat (limited to 'app/controllers/import/bitbucket_controller.rb')
-rw-r--r--app/controllers/import/bitbucket_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/import/bitbucket_controller.rb b/app/controllers/import/bitbucket_controller.rb
index 8a0f4a36781..c933b05e0c4 100644
--- a/app/controllers/import/bitbucket_controller.rb
+++ b/app/controllers/import/bitbucket_controller.rb
@@ -57,7 +57,7 @@ class Import::BitbucketController < Import::BaseController
extra: { user_role: user_role(current_user, target_namespace), import_type: 'bitbucket' }
)
- if current_user.can?(:create_projects, target_namespace)
+ if current_user.can?(:import_projects, target_namespace)
# The token in a session can be expired, we need to get most recent one because
# Bitbucket::Connection class refreshes it.
session[:bitbucket_token] = bitbucket_client.connection.token
@@ -70,7 +70,7 @@ class Import::BitbucketController < Import::BaseController
render json: { errors: project_save_error(project) }, status: :unprocessable_entity
end
else
- render json: { errors: _('This namespace has already been taken! Please choose another one.') }, status: :unprocessable_entity
+ render json: { errors: _('You are not allowed to import projects in this namespace.') }, status: :unprocessable_entity
end
end