Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
ab4671f2
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ab4671f2
编写于
5月 07, 2016
作者:
A
Ahmad Sherif
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix adding a todo for private group members
Fixes #14002
上级
2e116227
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
2 deletion
+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
未找到文件。
CHANGELOG
浏览文件 @
ab4671f2
...
...
@@ -29,6 +29,7 @@ v 8.8.0 (unreleased)
- 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
- 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
- Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented
...
...
app/models/concerns/mentionable.rb
浏览文件 @
ab4671f2
...
...
@@ -43,8 +43,8 @@ module Mentionable
self
end
def
all_references
(
current_user
=
self
.
author
,
text
=
nil
)
ext
=
Gitlab
::
ReferenceExtractor
.
new
(
self
.
project
,
current_user
,
self
.
author
)
def
all_references
(
current_user
=
nil
,
text
=
nil
)
ext
=
Gitlab
::
ReferenceExtractor
.
new
(
self
.
project
,
current_user
||
self
.
author
,
self
.
author
)
if
text
ext
.
analyze
(
text
)
...
...
spec/services/todo_service_spec.rb
浏览文件 @
ab4671f2
...
...
@@ -55,6 +55,25 @@ describe TodoService, services: true do
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
)
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
describe
'#update_issue'
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录