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
Léo-Paul Géneau
gitlab-ce
Commits
98559adf
Commit
98559adf
authored
Sep 19, 2016
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test if issue authors can access private projects
parent
fe084819
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
CHANGELOG
CHANGELOG
+1
-0
spec/policies/project_policy_spec.rb
spec/policies/project_policy_spec.rb
+13
-0
No files found.
CHANGELOG
View file @
98559adf
...
@@ -41,6 +41,7 @@ v 8.12.0 (unreleased)
...
@@ -41,6 +41,7 @@ v 8.12.0 (unreleased)
- Expose `sha` and `merge_commit_sha` in merge request API (Ben Boeckel)
- 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)
- Set path for all JavaScript cookies to honor GitLab's subdirectory setting !5627 (Mike Greiling)
- Fix blame table layout width
- 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)
- Fix bug where pagination is still displayed despite all todos marked as done (ClemMakesApps)
- Request only the LDAP attributes we need !6187
- Request only the LDAP attributes we need !6187
- Center build stage columns in pipeline overview (ClemMakesApps)
- Center build stage columns in pipeline overview (ClemMakesApps)
...
...
spec/policies/project_policy_spec.rb
View file @
98559adf
...
@@ -33,4 +33,17 @@ describe ProjectPolicy, models: true do
...
@@ -33,4 +33,17 @@ describe ProjectPolicy, models: true do
it
'returns increasing permissions for each level'
do
it
'returns increasing permissions for each level'
do
expect
(
users_permissions
).
to
eq
(
users_permissions
.
sort
.
uniq
)
expect
(
users_permissions
).
to
eq
(
users_permissions
.
sort
.
uniq
)
end
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
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