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
cfbf23e3
Commit
cfbf23e3
authored
Apr 30, 2020
by
Lee Tickett
Committed by
Grzegorz Bizon
Apr 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow public view of pipeline schedules
parent
e5b8b9e6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
10 deletions
+18
-10
app/policies/project_policy.rb
app/policies/project_policy.rb
+4
-1
changelogs/unreleased/allow_public_view_of_pipeline_schedules.yml
...gs/unreleased/allow_public_view_of_pipeline_schedules.yml
+5
-0
spec/features/security/project/internal_access_spec.rb
spec/features/security/project/internal_access_spec.rb
+3
-3
spec/features/security/project/private_access_spec.rb
spec/features/security/project/private_access_spec.rb
+1
-1
spec/features/security/project/public_access_spec.rb
spec/features/security/project/public_access_spec.rb
+5
-5
No files found.
app/policies/project_policy.rb
View file @
cfbf23e3
...
...
@@ -218,6 +218,7 @@ class ProjectPolicy < BasePolicy
enable
:read_build
enable
:read_container_image
enable
:read_pipeline
enable
:read_pipeline_schedule
enable
:read_environment
enable
:read_deployment
enable
:read_merge_request
...
...
@@ -262,7 +263,6 @@ class ProjectPolicy < BasePolicy
enable
:update_commit_status
enable
:create_build
enable
:update_build
enable
:read_pipeline_schedule
enable
:create_merge_request_from
enable
:create_wiki
enable
:push_code
...
...
@@ -395,6 +395,7 @@ class ProjectPolicy < BasePolicy
prevent
:fork_project
prevent
:read_commit_status
prevent
:read_pipeline
prevent
:read_pipeline_schedule
prevent
(
*
create_read_update_admin_destroy
(
:release
))
end
...
...
@@ -421,6 +422,7 @@ class ProjectPolicy < BasePolicy
enable
:read_merge_request
enable
:read_note
enable
:read_pipeline
enable
:read_pipeline_schedule
enable
:read_commit_status
enable
:read_container_image
enable
:download_code
...
...
@@ -439,6 +441,7 @@ class ProjectPolicy < BasePolicy
rule
{
public_builds
&
can?
(
:guest_access
)
}.
policy
do
enable
:read_pipeline
enable
:read_pipeline_schedule
end
# These rules are included to allow maintainers of projects to push to certain
...
...
changelogs/unreleased/allow_public_view_of_pipeline_schedules.yml
0 → 100644
View file @
cfbf23e3
---
title
:
Allow public access to pipeline schedules
merge_request
:
20806
author
:
Lee Tickett
type
:
fixed
spec/features/security/project/internal_access_spec.rb
View file @
cfbf23e3
...
...
@@ -464,9 +464,9 @@ describe "Internal Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:owner
).
of
(
project
)
}
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_
deni
ed_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
(
:reporter
).
of
(
project
)
}
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/private_access_spec.rb
View file @
cfbf23e3
...
...
@@ -499,7 +499,7 @@ describe "Private Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:owner
).
of
(
project
)
}
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_
deni
ed_for
(
:reporter
).
of
(
project
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
:reporter
).
of
(
project
)
}
it
{
is_expected
.
to
be_denied_for
(
:guest
).
of
(
project
)
}
it
{
is_expected
.
to
be_denied_for
(
:user
)
}
it
{
is_expected
.
to
be_denied_for
(
:external
)
}
...
...
spec/features/security/project/public_access_spec.rb
View file @
cfbf23e3
...
...
@@ -278,11 +278,11 @@ describe "Public Project Access" do
it
{
is_expected
.
to
be_allowed_for
(
:owner
).
of
(
project
)
}
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_
deni
ed_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
(
:reporter
).
of
(
project
)
}
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"
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