summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-08-29 15:19:35 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-08-29 15:19:35 +0300
commit01520d5d77604a2487b32e79a1d5d80caf136329 (patch)
tree80fa2dfd2a06d73b1dcdf60a74030409029883bc /app/models
parent36361f4e451cdd84482d7b4fb2477f1f2c4cdd6b (diff)
downloadgitlab-ce-01520d5d77604a2487b32e79a1d5d80caf136329.tar.gz
Dont allow edit or remove of system notes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models')
-rw-r--r--app/models/note.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 01f72b95c48..0fa1a7ab615 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -337,4 +337,8 @@ class Note < ActiveRecord::Base
def set_references
notice_added_references(project, author)
end
+
+ def editable?
+ !system
+ end
end