-
- Downloads
There was an error fetching the commit references. Please try again later.
Allow guests users to access project releases
This is step one of resolving https://gitlab.com/gitlab-org/gitlab-ce/issues/56838. Here is what changed: - Revert the security fix from bdee9e84. - Do not leak repository information (tag name, commit) to guests in API responses. - Do not include links to source code in API responses for users that do not have download_code access. - Show Releases in sidebar for guests. - Do not display links to source code under Assets for users that do not have download_code access. GET ':id/releases/:tag_name' still do not allow guests to access releases. This is to prevent guessing tag existence.
Showing
- app/assets/javascripts/releases/components/release_block.vue 2 additions, 2 deletionsapp/assets/javascripts/releases/components/release_block.vue
- app/helpers/projects_helper.rb 3 additions, 2 deletionsapp/helpers/projects_helper.rb
- app/models/release.rb 5 additions, 2 deletionsapp/models/release.rb
- app/policies/project_policy.rb 1 addition, 1 deletionapp/policies/project_policy.rb
- changelogs/unreleased/56838-allow-guest-access-to-releases.yml 5 additions, 0 deletions...elogs/unreleased/56838-allow-guest-access-to-releases.yml
- lib/api/entities.rb 15 additions, 4 deletionslib/api/entities.rb
- lib/api/releases.rb 10 additions, 6 deletionslib/api/releases.rb
- spec/fixtures/api/schemas/public_api/v4/release.json 28 additions, 7 deletionsspec/fixtures/api/schemas/public_api/v4/release.json
- spec/fixtures/api/schemas/public_api/v4/release/release_for_guest.json 22 additions, 0 deletions.../api/schemas/public_api/v4/release/release_for_guest.json
- spec/fixtures/api/schemas/public_api/v4/release/releases_for_guest.json 4 additions, 0 deletions...api/schemas/public_api/v4/release/releases_for_guest.json
- spec/fixtures/api/schemas/public_api/v4/release/tag_release.json 12 additions, 0 deletions...xtures/api/schemas/public_api/v4/release/tag_release.json
- spec/fixtures/api/schemas/public_api/v4/releases.json 4 additions, 0 deletionsspec/fixtures/api/schemas/public_api/v4/releases.json
- spec/fixtures/api/schemas/public_api/v4/tag.json 1 addition, 1 deletionspec/fixtures/api/schemas/public_api/v4/tag.json
- spec/models/release_spec.rb 5 additions, 0 deletionsspec/models/release_spec.rb
- spec/policies/project_policy_spec.rb 2 additions, 2 deletionsspec/policies/project_policy_spec.rb
- spec/requests/api/releases_spec.rb 41 additions, 8 deletionsspec/requests/api/releases_spec.rb
- spec/requests/api/tags_spec.rb 1 addition, 1 deletionspec/requests/api/tags_spec.rb
- spec/support/shared_context/policies/project_policy_shared_context.rb 1 addition, 2 deletions.../shared_context/policies/project_policy_shared_context.rb
Please register or sign in to comment