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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
ab4671f2
Commit
ab4671f2
authored
May 07, 2016
by
Ahmad Sherif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix adding a todo for private group members
Fixes #14002
parent
2e116227
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
CHANGELOG
CHANGELOG
+1
-0
app/models/concerns/mentionable.rb
app/models/concerns/mentionable.rb
+2
-2
spec/services/todo_service_spec.rb
spec/services/todo_service_spec.rb
+19
-0
No files found.
CHANGELOG
View file @
ab4671f2
...
@@ -29,6 +29,7 @@ v 8.8.0 (unreleased)
...
@@ -29,6 +29,7 @@ v 8.8.0 (unreleased)
- Fix Gravatar hint in user profile when Gravatar is disabled. !3988 (Artem Sidorenko)
- Fix Gravatar hint in user profile when Gravatar is disabled. !3988 (Artem Sidorenko)
- Expire repository exists? and has_visible_content? caches after a push if necessary
- Expire repository exists? and has_visible_content? caches after a push if necessary
- Fix unintentional filtering bug in issues sorted by milestone due (Takuya Noguchi)
- Fix unintentional filtering bug in issues sorted by milestone due (Takuya Noguchi)
- Fix adding a todo for private group members (Ahmad Sherif)
v 8.7.3
v 8.7.3
- Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented
- Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented
...
...
app/models/concerns/mentionable.rb
View file @
ab4671f2
...
@@ -43,8 +43,8 @@ module Mentionable
...
@@ -43,8 +43,8 @@ module Mentionable
self
self
end
end
def
all_references
(
current_user
=
self
.
author
,
text
=
nil
)
def
all_references
(
current_user
=
nil
,
text
=
nil
)
ext
=
Gitlab
::
ReferenceExtractor
.
new
(
self
.
project
,
current_user
,
self
.
author
)
ext
=
Gitlab
::
ReferenceExtractor
.
new
(
self
.
project
,
current_user
||
self
.
author
,
self
.
author
)
if
text
if
text
ext
.
analyze
(
text
)
ext
.
analyze
(
text
)
...
...
spec/services/todo_service_spec.rb
View file @
ab4671f2
...
@@ -55,6 +55,25 @@ describe TodoService, services: true do
...
@@ -55,6 +55,25 @@ describe TodoService, services: true do
should_create_todo
(
user:
admin
,
target:
confidential_issue
,
author:
john_doe
,
action:
Todo
::
MENTIONED
)
should_create_todo
(
user:
admin
,
target:
confidential_issue
,
author:
john_doe
,
action:
Todo
::
MENTIONED
)
should_not_create_todo
(
user:
john_doe
,
target:
confidential_issue
,
author:
john_doe
,
action:
Todo
::
MENTIONED
)
should_not_create_todo
(
user:
john_doe
,
target:
confidential_issue
,
author:
john_doe
,
action:
Todo
::
MENTIONED
)
end
end
context
'when a private group is mentioned'
do
let
(
:group
)
{
create
:group
,
:private
}
let
(
:project
)
{
create
:project
,
:private
,
group:
group
}
let
(
:issue
)
{
create
:issue
,
author:
author
,
project:
project
,
description:
group
.
to_reference
}
before
do
group
.
add_owner
(
author
)
group
.
add_user
(
member
,
Gitlab
::
Access
::
DEVELOPER
)
group
.
add_user
(
john_doe
,
Gitlab
::
Access
::
DEVELOPER
)
service
.
new_issue
(
issue
,
author
)
end
it
'creates a todo for group members'
do
should_create_todo
(
user:
member
,
target:
issue
)
should_create_todo
(
user:
john_doe
,
target:
issue
)
end
end
end
end
describe
'#update_issue'
do
describe
'#update_issue'
do
...
...
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