summaryrefslogtreecommitdiff
path: root/spec/models/commit_spec.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2016-11-07 15:31:34 +0000
committerSean McGivern <sean@mcgivern.me.uk>2016-11-07 15:31:34 +0000
commit7ce03197d33e1194bed49fbd9ac7778f72d6fada (patch)
tree2da07eb8df59a63c617df15900d2133eef9e9f63 /spec/models/commit_spec.rb
parentce03eba57993fb0846c3a164b3eb757dd0a4e0a3 (diff)
parent80a2e3a9c89a34df06eb2996fd5bdbaa6223f98c (diff)
downloadgitlab-ce-7ce03197d33e1194bed49fbd9ac7778f72d6fada.tar.gz
Merge branch 'missing-raw-snippet-access-spec' into 'master'
Add missing security specs for raw snippet access ## What does this MR do? It extends the project snippets access security specs to cover raw snippet paths as well. When I was researching snippets for !7256, I noticed that specs existed for the HTML show view of project snippets but not the raw view. Seeing as this is a spec that is checking for access regressions on places where sensitive information might be kept, I thought it would be a good idea to cover the raw snippets access too. To balance out the karma of adding in extra tests I also changed the tests to all use an `empty_project` spec. ## Are there points in the code the reviewer needs to double check? With the aim of making the specs easier to read, I restructured some of them to use context blocks for each type of snippet. I've used the same access rights defined for the show snippet paths for the raw snippet access. ## Why was this MR needed? To catch security regressions on raw snippet access for projects. ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [-] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added - [-] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [-] API support added - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? See merge request !7300
Diffstat (limited to 'spec/models/commit_spec.rb')
0 files changed, 0 insertions, 0 deletions