summaryrefslogtreecommitdiff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-10-06 16:47:27 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-10-06 16:47:27 +0000
commita68a39e34120e0cf67d95e143326d03f61288cdf (patch)
treed979ff0c94c6b78a4c19e55fda18b1f2c88ba852 /app/models/concerns
parent8c4dea25d4b76d75d83d22b9925d784ec09b46f9 (diff)
parent26f6065ec686d16a053e33f031779a8e75f0c5c9 (diff)
downloadgitlab-ce-a68a39e34120e0cf67d95e143326d03f61288cdf.tar.gz
Merge branch '18608-lock-issues-v2' into 'master'
Resolve "Lock issue and merge request" Closes #18608 See merge request gitlab-org/gitlab-ce!14531
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/noteable.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/concerns/noteable.rb b/app/models/concerns/noteable.rb
index 1c4ddabcad5..5d75b2aa6a3 100644
--- a/app/models/concerns/noteable.rb
+++ b/app/models/concerns/noteable.rb
@@ -74,4 +74,8 @@ module Noteable
def discussions_can_be_resolved_by?(user)
discussions_to_be_resolved.all? { |discussion| discussion.can_resolve?(user) }
end
+
+ def lockable?
+ [MergeRequest, Issue].include?(self.class)
+ end
end