Update upstream source from tag 'upstream/13.0.4'
Update to upstream version '13.0.4'
with Debian dir 5842ec48df
This commit is contained in:
commit
4e5a3c2e9b
7 changed files with 108 additions and 73 deletions
|
@ -1,5 +1,9 @@
|
||||||
Please view this file on the master branch, on stable branches it's out of date.
|
Please view this file on the master branch, on stable branches it's out of date.
|
||||||
|
|
||||||
|
## 13.0.3 (2020-05-29)
|
||||||
|
|
||||||
|
- No changes.
|
||||||
|
|
||||||
## 13.0.2 (2020-05-28)
|
## 13.0.2 (2020-05-28)
|
||||||
|
|
||||||
- No changes.
|
- No changes.
|
||||||
|
|
|
@ -2,6 +2,13 @@
|
||||||
documentation](doc/development/changelog.md) for instructions on adding your own
|
documentation](doc/development/changelog.md) for instructions on adding your own
|
||||||
entry.
|
entry.
|
||||||
|
|
||||||
|
## 13.0.4 (2020-06-03)
|
||||||
|
|
||||||
|
### Security (1 change)
|
||||||
|
|
||||||
|
- Prevent fetching repository code with unauthorized ci token.
|
||||||
|
|
||||||
|
|
||||||
## 13.0.3 (2020-05-29)
|
## 13.0.3 (2020-05-29)
|
||||||
|
|
||||||
### Fixed (8 changes, 1 of them is from the community)
|
### Fixed (8 changes, 1 of them is from the community)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
13.0.3
|
13.0.4
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
13.0.3
|
13.0.4
|
||||||
|
|
|
@ -463,6 +463,7 @@ class ProjectPolicy < BasePolicy
|
||||||
rule { repository_disabled }.policy do
|
rule { repository_disabled }.policy do
|
||||||
prevent :push_code
|
prevent :push_code
|
||||||
prevent :download_code
|
prevent :download_code
|
||||||
|
prevent :build_download_code
|
||||||
prevent :fork_project
|
prevent :fork_project
|
||||||
prevent :read_commit_status
|
prevent :read_commit_status
|
||||||
prevent :read_pipeline
|
prevent :read_pipeline
|
||||||
|
|
|
@ -114,36 +114,38 @@ lBlGGSW4gNfL1IYoakRwJiNiqZ+Gb7+6kHDSVneFeO/qJakXzlByjAA6quPbYzSf
|
||||||
+AZxAeKCINT+b72x
|
+AZxAeKCINT+b72x
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIIFdDCCBFygAwIBAgIQJ2buVutJ846r13Ci/ITeIjANBgkqhkiG9w0BAQwFADBv
|
MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCB
|
||||||
MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk
|
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
|
||||||
ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF
|
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
|
||||||
eHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFow
|
BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAwMTE5
|
||||||
gYUxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
|
MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgT
|
||||||
BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMSswKQYD
|
EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
|
||||||
VQQDEyJDT01PRE8gUlNBIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkq
|
Q09NT0RPIENBIExpbWl0ZWQx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8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7ILaZRfyHB
|
||||||
|
NVOFBkpdn627G190
|
||||||
-----END CERTIFICATE-----'
|
-----END CERTIFICATE-----'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,6 +5,7 @@ require 'spec_helper'
|
||||||
describe ProjectPolicy do
|
describe ProjectPolicy do
|
||||||
include ExternalAuthorizationServiceHelpers
|
include ExternalAuthorizationServiceHelpers
|
||||||
include_context 'ProjectPolicy context'
|
include_context 'ProjectPolicy context'
|
||||||
|
let_it_be(:other_user) { create(:user) }
|
||||||
let_it_be(:guest) { create(:user) }
|
let_it_be(:guest) { create(:user) }
|
||||||
let_it_be(:reporter) { create(:user) }
|
let_it_be(:reporter) { create(:user) }
|
||||||
let_it_be(:developer) { create(:user) }
|
let_it_be(:developer) { create(:user) }
|
||||||
|
@ -163,7 +164,7 @@ describe ProjectPolicy do
|
||||||
subject { described_class.new(owner, project) }
|
subject { described_class.new(owner, project) }
|
||||||
|
|
||||||
it 'disallows all permissions when the feature is disabled' do
|
it 'disallows all permissions when the feature is disabled' do
|
||||||
project.project_feature.update(merge_requests_access_level: ProjectFeature::DISABLED)
|
project.project_feature.update!(merge_requests_access_level: ProjectFeature::DISABLED)
|
||||||
|
|
||||||
mr_permissions = [:create_merge_request_from, :read_merge_request,
|
mr_permissions = [:create_merge_request_from, :read_merge_request,
|
||||||
:update_merge_request, :admin_merge_request,
|
:update_merge_request, :admin_merge_request,
|
||||||
|
@ -215,7 +216,7 @@ describe ProjectPolicy do
|
||||||
subject { described_class.new(owner, project) }
|
subject { described_class.new(owner, project) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
project.project_feature.update(builds_access_level: ProjectFeature::DISABLED)
|
project.project_feature.update!(builds_access_level: ProjectFeature::DISABLED)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'without metrics_dashboard_allowed' do
|
context 'without metrics_dashboard_allowed' do
|
||||||
|
@ -260,7 +261,7 @@ describe ProjectPolicy do
|
||||||
subject { described_class.new(guest, project) }
|
subject { described_class.new(guest, project) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
project.project_feature.update(builds_access_level: ProjectFeature::PRIVATE)
|
project.project_feature.update!(builds_access_level: ProjectFeature::PRIVATE)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'disallows pipeline and commit_status permissions' do
|
it 'disallows pipeline and commit_status permissions' do
|
||||||
|
@ -275,50 +276,70 @@ describe ProjectPolicy do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'repository feature' do
|
context 'repository feature' do
|
||||||
subject { described_class.new(owner, project) }
|
let(:repository_permissions) do
|
||||||
|
[
|
||||||
before do
|
:create_pipeline, :update_pipeline, :admin_pipeline, :destroy_pipeline,
|
||||||
project.project_feature.update(repository_access_level: ProjectFeature::DISABLED)
|
:create_build, :read_build, :update_build, :admin_build, :destroy_build,
|
||||||
|
:create_pipeline_schedule, :read_pipeline_schedule, :update_pipeline_schedule, :admin_pipeline_schedule, :destroy_pipeline_schedule,
|
||||||
|
:create_environment, :read_environment, :update_environment, :admin_environment, :destroy_environment,
|
||||||
|
:create_cluster, :read_cluster, :update_cluster, :admin_cluster,
|
||||||
|
:create_deployment, :read_deployment, :update_deployment, :admin_deployment, :destroy_deployment,
|
||||||
|
:destroy_release, :download_code, :build_download_code
|
||||||
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'without metrics_dashboard_allowed' do
|
context 'when user is a project member' do
|
||||||
before do
|
subject { described_class.new(owner, project) }
|
||||||
project.project_feature.update(metrics_dashboard_access_level: ProjectFeature::DISABLED)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'disallows all permissions when the feature is disabled' do
|
context 'when it is disabled' do
|
||||||
repository_permissions = [
|
before do
|
||||||
:create_pipeline, :update_pipeline, :admin_pipeline, :destroy_pipeline,
|
project.project_feature.update!(
|
||||||
:create_build, :read_build, :update_build, :admin_build, :destroy_build,
|
repository_access_level: ProjectFeature::DISABLED,
|
||||||
:create_pipeline_schedule, :read_pipeline_schedule, :update_pipeline_schedule, :admin_pipeline_schedule, :destroy_pipeline_schedule,
|
merge_requests_access_level: ProjectFeature::DISABLED,
|
||||||
:create_environment, :read_environment, :update_environment, :admin_environment, :destroy_environment,
|
builds_access_level: ProjectFeature::DISABLED,
|
||||||
:create_cluster, :read_cluster, :update_cluster, :admin_cluster,
|
forking_access_level: ProjectFeature::DISABLED
|
||||||
:create_deployment, :read_deployment, :update_deployment, :admin_deployment, :destroy_deployment,
|
)
|
||||||
:destroy_release
|
end
|
||||||
]
|
|
||||||
|
|
||||||
expect_disallowed(*repository_permissions)
|
context 'without metrics_dashboard_allowed' do
|
||||||
|
before do
|
||||||
|
project.project_feature.update(metrics_dashboard_access_level: ProjectFeature::DISABLED)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'disallows all permissions when the feature is disabled' do
|
||||||
|
expect_disallowed(*repository_permissions)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'with metrics_dashboard_allowed' do
|
||||||
|
before do
|
||||||
|
project.project_feature.update(metrics_dashboard_access_level: ProjectFeature::ENABLED)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'disallows all permissions but read_environment when the feature is disabled' do
|
||||||
|
expect_disallowed(*(repository_permissions - [:read_environment]))
|
||||||
|
expect_allowed(:read_environment)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with metrics_dashboard_allowed' do
|
context 'when user is some other user' do
|
||||||
before do
|
subject { described_class.new(other_user, project) }
|
||||||
project.project_feature.update(metrics_dashboard_access_level: ProjectFeature::ENABLED)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'disallows all permissions when the feature is disabled' do
|
context 'when access level is private' do
|
||||||
repository_permissions = [
|
before do
|
||||||
:create_pipeline, :update_pipeline, :admin_pipeline, :destroy_pipeline,
|
project.project_feature.update!(
|
||||||
:create_build, :read_build, :update_build, :admin_build, :destroy_build,
|
repository_access_level: ProjectFeature::PRIVATE,
|
||||||
:create_pipeline_schedule, :read_pipeline_schedule, :update_pipeline_schedule, :admin_pipeline_schedule, :destroy_pipeline_schedule,
|
merge_requests_access_level: ProjectFeature::PRIVATE,
|
||||||
:create_environment, :update_environment, :admin_environment, :destroy_environment,
|
builds_access_level: ProjectFeature::PRIVATE,
|
||||||
:create_cluster, :read_cluster, :update_cluster, :admin_cluster,
|
forking_access_level: ProjectFeature::PRIVATE
|
||||||
:create_deployment, :read_deployment, :update_deployment, :admin_deployment, :destroy_deployment,
|
)
|
||||||
:destroy_release
|
end
|
||||||
]
|
|
||||||
|
|
||||||
expect_disallowed(*repository_permissions)
|
it 'disallows all permissions' do
|
||||||
expect_allowed(:read_environment)
|
expect_disallowed(*repository_permissions)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -601,7 +622,7 @@ describe ProjectPolicy do
|
||||||
|
|
||||||
context 'feature enabled' do
|
context 'feature enabled' do
|
||||||
before do
|
before do
|
||||||
project.project_feature.update(metrics_dashboard_access_level: ProjectFeature::ENABLED)
|
project.project_feature.update!(metrics_dashboard_access_level: ProjectFeature::ENABLED)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with reporter' do
|
context 'with reporter' do
|
||||||
|
@ -665,7 +686,7 @@ describe ProjectPolicy do
|
||||||
|
|
||||||
context 'feature enabled' do
|
context 'feature enabled' do
|
||||||
before do
|
before do
|
||||||
project.project_feature.update(metrics_dashboard_access_level: ProjectFeature::ENABLED)
|
project.project_feature.update!(metrics_dashboard_access_level: ProjectFeature::ENABLED)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with reporter' do
|
context 'with reporter' do
|
||||||
|
@ -750,7 +771,7 @@ describe ProjectPolicy do
|
||||||
|
|
||||||
context 'feature disabled' do
|
context 'feature disabled' do
|
||||||
before do
|
before do
|
||||||
project.project_feature.update(metrics_dashboard_access_level: ProjectFeature::DISABLED)
|
project.project_feature.update!(metrics_dashboard_access_level: ProjectFeature::DISABLED)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with reporter' do
|
context 'with reporter' do
|
||||||
|
|
Loading…
Reference in a new issue