summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLong Nguyen <long.polyglot@gmail.com>2016-05-21 00:38:01 +0700
committerLong Nguyen <long.polyglot@gmail.com>2016-05-21 00:38:01 +0700
commita263425ff14b3524751d41dc6ac74050a24b8609 (patch)
treef4788b3404878e3074f3a12c30307d773dfad853
parentad17741008b5ec874f92016ed48c2c1e6638dab5 (diff)
parent5d031c868a503300a23d2119b6183f263b735f04 (diff)
downloadgitlab-ce-a263425ff14b3524751d41dc6ac74050a24b8609.tar.gz
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into issue_17479_todos_not_remove_when_leave_project
-rw-r--r--app/models/project.rb11
-rw-r--r--db/schema.rb7
2 files changed, 7 insertions, 11 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 9a34198e098..37de1dfe4d5 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -204,7 +204,7 @@ class Project < ActiveRecord::Base
state :finished
state :failed
- after_transition any => :finished, do: :clear_import_data
+ after_transition any => :finished, do: :reset_cache_and_import_attrs
end
class << self
@@ -360,7 +360,7 @@ class Project < ActiveRecord::Base
end
end
- def clear_import_data
+ def reset_cache_and_import_attrs
update(import_error: nil)
ProjectCacheWorker.perform_async(self.id)
@@ -426,12 +426,7 @@ class Project < ActiveRecord::Base
end
def safe_import_url
- result = URI.parse(self.import_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
+ Gitlab::UrlSanitizer.new(import_url).masked_url
end
def check_limit
diff --git a/db/schema.rb b/db/schema.rb
index 2e154b98b34..aee5fb90937 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# 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
enable_extension "plpgsql"
@@ -82,6 +82,7 @@ ActiveRecord::Schema.define(version: 20160509201028) do
t.integer "metrics_packet_size", default: 1
t.text "disabled_oauth_sign_in_sources"
t.string "health_check_access_token"
+ t.boolean "send_user_confirmation_email", default: false
end
create_table "audit_events", force: :cascade do |t|
@@ -633,10 +634,10 @@ ActiveRecord::Schema.define(version: 20160509201028) do
t.string "line_code"
t.string "commit_id"
t.integer "noteable_id"
- t.boolean "system", default: false, null: false
+ t.boolean "system", default: false, null: false
t.text "st_diff"
t.integer "updated_by_id"
- t.boolean "is_award", default: false, null: false
+ t.boolean "is_award", default: false, null: false
t.string "type"
end