Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
b20f677b
Commit
b20f677b
authored
Dec 10, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/emoji_edit_disallow'
parents
746320ce
e3ee46a1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
CHANGELOG
CHANGELOG
+1
-0
app/models/note.rb
app/models/note.rb
+1
-1
spec/models/note_spec.rb
spec/models/note_spec.rb
+17
-0
No files found.
CHANGELOG
View file @
b20f677b
...
...
@@ -35,6 +35,7 @@ v 8.3.0 (unreleased)
- Use new style for wiki
- Use new style for milestone detail page
- Fix sidebar tooltips when collapsed
- Prevent possible XSS attack with award-emoji
v 8.2.3
- Fix application settings cache not expiring after changes (Stan Hu)
...
...
app/models/note.rb
View file @
b20f677b
...
...
@@ -350,7 +350,7 @@ class Note < ActiveRecord::Base
end
def
editable?
!
system
?
!
system
?
&&
!
is_award
end
# Checks if note is an award added as a comment
...
...
spec/models/note_spec.rb
View file @
b20f677b
...
...
@@ -142,4 +142,21 @@ describe Note, models: true do
expect
(
Note
.
grouped_awards
.
first
.
last
).
to
match_array
(
Note
.
all
)
end
end
describe
"editable?"
do
it
"returns true"
do
note
=
build
(
:note
)
expect
(
note
.
editable?
).
to
be_truthy
end
it
"returns false"
do
note
=
build
(
:note
,
system:
true
)
expect
(
note
.
editable?
).
to
be_falsy
end
it
"returns false"
do
note
=
build
(
:note
,
is_award:
true
,
note:
"smiley"
)
expect
(
note
.
editable?
).
to
be_falsy
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment