summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2015-09-28 16:00:53 +0200
committerrymai <remy@rymai.me>2015-09-29 21:11:51 +0200
commit5f95a5e070c76c582a2b394377b0f350f4b1cff9 (patch)
tree94ae75916155f0337b8981cab1d04e563c8e24af /app/models/user.rb
parent10c036fcf59297663fd1121f7b48d1a289a2e312 (diff)
downloadgitlab-ce-5f95a5e070c76c582a2b394377b0f350f4b1cff9.tar.gz
Disable the "Report abuse" button if a user has already been reported
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 3879f3fd381..a3b149ff992 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -97,7 +97,9 @@ class User < ActiveRecord::Base
# Namespace for personal projects
has_one :namespace, -> { where type: nil }, dependent: :destroy, foreign_key: :owner_id, class_name: "Namespace"
+
# Profile
+ has_one :abuse_report, dependent: :destroy
has_many :keys, dependent: :destroy
has_many :emails, dependent: :destroy
has_many :identities, dependent: :destroy, autosave: true