Skip to content
代码片段 群组 项目
提交 98559adf 编辑于 作者: Felipe Artur's avatar Felipe Artur
浏览文件

Test if issue authors can access private projects

上级 fe084819
No related branches found
No related tags found
无相关合并请求
......@@ -41,6 +41,7 @@ v 8.12.0 (unreleased)
- Expose `sha` and `merge_commit_sha` in merge request API (Ben Boeckel)
- Set path for all JavaScript cookies to honor GitLab's subdirectory setting !5627 (Mike Greiling)
- Fix blame table layout width
- Spec testing if issue authors can read issues on private projects
- Fix bug where pagination is still displayed despite all todos marked as done (ClemMakesApps)
- Request only the LDAP attributes we need !6187
- Center build stage columns in pipeline overview (ClemMakesApps)
......
......@@ -33,4 +33,17 @@
it 'returns increasing permissions for each level' do
expect(users_permissions).to eq(users_permissions.sort.uniq)
end
it 'does not include the read_issue permission when the issue author is not a member of the private project' do
project = create(:project, :private)
issue = create(:issue, project: project)
user = issue.author
expect(project.team.member?(issue.author)).to eq(false)
expect(BasePolicy.class_for(project).abilities(user, project).can_set).
not_to include(:read_issue)
expect(Ability.allowed?(user, :read_issue, project)).to be_falsy
end
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册