BigW Consortium Gitlab

Commit a263425f by Long Nguyen

Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into…

Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into issue_17479_todos_not_remove_when_leave_project
parents ad177410 5d031c86
...@@ -204,7 +204,7 @@ class Project < ActiveRecord::Base ...@@ -204,7 +204,7 @@ class Project < ActiveRecord::Base
state :finished state :finished
state :failed state :failed
after_transition any => :finished, do: :clear_import_data after_transition any => :finished, do: :reset_cache_and_import_attrs
end end
class << self class << self
...@@ -360,7 +360,7 @@ class Project < ActiveRecord::Base ...@@ -360,7 +360,7 @@ class Project < ActiveRecord::Base
end end
end end
def clear_import_data def reset_cache_and_import_attrs
update(import_error: nil) update(import_error: nil)
ProjectCacheWorker.perform_async(self.id) ProjectCacheWorker.perform_async(self.id)
...@@ -426,12 +426,7 @@ class Project < ActiveRecord::Base ...@@ -426,12 +426,7 @@ class Project < ActiveRecord::Base
end end
def safe_import_url def safe_import_url
result = URI.parse(self.import_url) Gitlab::UrlSanitizer.new(import_url).masked_url
result.password = '*****' unless result.password.nil?
result.user = '*****' unless result.user.nil? || result.user == "git" #tokens or other data may be saved as user
result.to_s
rescue
self.import_url
end end
def check_limit def check_limit
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160509201028) do ActiveRecord::Schema.define(version: 20160516174813) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
...@@ -82,6 +82,7 @@ ActiveRecord::Schema.define(version: 20160509201028) do ...@@ -82,6 +82,7 @@ ActiveRecord::Schema.define(version: 20160509201028) do
t.integer "metrics_packet_size", default: 1 t.integer "metrics_packet_size", default: 1
t.text "disabled_oauth_sign_in_sources" t.text "disabled_oauth_sign_in_sources"
t.string "health_check_access_token" t.string "health_check_access_token"
t.boolean "send_user_confirmation_email", default: false
end end
create_table "audit_events", force: :cascade do |t| create_table "audit_events", force: :cascade do |t|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment