summaryrefslogtreecommitdiff
path: root/spec/policies
diff options
context:
space:
mode:
authorKrasimir Angelov <kangelov@gitlab.com>2019-05-03 13:29:20 +0000
committerLin Jen-Shin <godfat@godfat.org>2019-05-03 13:29:20 +0000
commit241ba4be7989547b3bc3f9a1a20b8dee7a4e9a0c (patch)
tree085737123336ffc4abbf65652a7365c191c8a64c /spec/policies
parent9a9aa22352be07f2ecdfb1396016a9a03d26f559 (diff)
downloadgitlab-ce-241ba4be7989547b3bc3f9a1a20b8dee7a4e9a0c.tar.gz
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 bdee9e8412d. - 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.
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/project_policy_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb
index 42f8bf3137b..8075fcade5f 100644
--- a/spec/policies/project_policy_spec.rb
+++ b/spec/policies/project_policy_spec.rb
@@ -17,7 +17,7 @@ describe ProjectPolicy do
read_project_for_iids read_issue_iid read_label
read_milestone read_project_snippet read_project_member read_note
create_project create_issue create_note upload_file create_merge_request_in
- award_emoji
+ award_emoji read_release
]
end
@@ -26,7 +26,7 @@ describe ProjectPolicy do
download_code fork_project create_project_snippet update_issue
admin_issue admin_label admin_list read_commit_status read_build
read_container_image read_pipeline read_environment read_deployment
- read_merge_request download_wiki_code read_sentry_issue read_release
+ read_merge_request download_wiki_code read_sentry_issue
]
end