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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d51a17c1
Commit
d51a17c1
authored
Jul 27, 2020
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix review app links are not shown in MR widgets
This commit fixes the bug by correcting project-level permission.
parent
ab4f3d2d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
18 deletions
+25
-18
app/policies/project_policy.rb
app/policies/project_policy.rb
+2
-0
changelogs/unreleased/fix-review-app-link-not-shown-in-public-projects.yml
...ased/fix-review-app-link-not-shown-in-public-projects.yml
+5
-0
spec/features/security/project/internal_access_spec.rb
spec/features/security/project/internal_access_spec.rb
+6
-6
spec/features/security/project/public_access_spec.rb
spec/features/security/project/public_access_spec.rb
+12
-12
No files found.
app/policies/project_policy.rb
View file @
d51a17c1
...
...
@@ -507,6 +507,8 @@ class ProjectPolicy < BasePolicy
enable
:read_note
enable
:read_pipeline
enable
:read_pipeline_schedule
enable
:read_environment
enable
:read_deployment
enable
:read_commit_status
enable
:read_container_image
enable
:download_code
...
...
changelogs/unreleased/fix-review-app-link-not-shown-in-public-projects.yml
0 → 100644
View file @
d51a17c1
---
title
:
Fix review app links are not shown in MR widgets in public projects
merge_request
:
37923
author
:
type
:
fixed
spec/features/security/project/internal_access_spec.rb
View file @
d51a17c1
...
...
@@ -479,8 +479,8 @@ RSpec.describe "Internal Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:maintainer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_denied_for
(
:external
)
}
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
...
...
@@ -495,8 +495,8 @@ RSpec.describe "Internal Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:maintainer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_denied_for
(
:external
)
}
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
...
...
@@ -511,8 +511,8 @@ RSpec.describe "Internal Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:maintainer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_denied_for
(
:external
)
}
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
end
...
...
spec/features/security/project/public_access_spec.rb
View file @
d51a17c1
...
...
@@ -293,10 +293,10 @@ RSpec.describe "Public Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:maintainer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:external
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:visitor
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:external
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:visitor
)
}
end
describe
"GET /:project_path/-/environments/:id"
do
...
...
@@ -309,10 +309,10 @@ RSpec.describe "Public Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:maintainer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:external
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:visitor
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:external
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:visitor
)
}
end
describe
"GET /:project_path/-/environments/:id/deployments"
do
...
...
@@ -325,10 +325,10 @@ RSpec.describe "Public Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:maintainer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
project
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:external
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
:visitor
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:user
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:external
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:visitor
)
}
end
describe
"GET /:project_path/-/environments/new"
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