diff options
author | Valery Sizov <valery@gitlab.com> | 2016-12-15 14:19:28 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-12-15 14:19:28 +0200 |
commit | 26628fb91a89bbe4998633eec00d2bd76cfb95c0 (patch) | |
tree | 561248da78a0d12ca64f528c94d5ee16d88cdb94 /app | |
parent | 076cdd204459496d7cdd14b86838c2c2c7875cd4 (diff) | |
download | gitlab-ce-26628fb91a89bbe4998633eec00d2bd76cfb95c0.tar.gz |
BB importer: Fixed bug with putting expired token to a project.clone_url
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/import/bitbucket_controller.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/import/bitbucket_controller.rb b/app/controllers/import/bitbucket_controller.rb index b9cc6556140..8e42cdf415f 100644 --- a/app/controllers/import/bitbucket_controller.rb +++ b/app/controllers/import/bitbucket_controller.rb @@ -49,6 +49,9 @@ class Import::BitbucketController < Import::BaseController namespace = find_or_create_namespace(@target_namespace, current_user) if current_user.can?(:create_projects, 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 @project = Gitlab::BitbucketImport::ProjectCreator.new(repo, @project_name, namespace, current_user, credentials).execute else render 'unauthorized' |