gitlab-org--gitlab-foss/lib
Douwe Maan 44cbfeaba8 Merge branch 'adam-fix-labels-find-or-create' into 'master'
Pass user instance to Labels::FindOrCreateService or skip_authorization: true

## What does this MR do?

It fixes a bug described in #23694 when `project.owner` was passed to `Labels::FindOrCreateService`. `Labels::FindOrCreateService` expected a user instance and `project.owner` may return a group as well. This MR makes sure that we either pass a user instance or `skip_authorization: true`.

## Are there points in the code the reviewer needs to double check?

- places where we pass `skip_authorization: true`

## Does this MR meet the acceptance criteria?

- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [ ] 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?

Fixes #23694

See merge request !7093
2016-10-28 15:01:59 +00:00
..
api API: Fix booleans not recognized as such when using the `to_boolean` helper 2016-10-27 18:21:09 +02:00
assets
backup Backups do not fail anymore when using tar on annex and custom_hooks 2016-10-27 11:24:35 +01:00
banzai Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
ci Add logical validation to gitlab-ci.yml 2016-10-18 12:22:51 +02:00
constraints Add relative url support to routing contrainers 2016-10-24 13:51:17 +03:00
container_registry Make rubocop happy 2016-07-15 18:05:39 +02:00
gitlab Merge branch 'adam-fix-labels-find-or-create' into 'master' 2016-10-28 15:01:59 +00:00
json_web_token
omni_auth
rouge/formatters Trim extra displayed carriage returns in diffs and files with CRLFs 2016-08-01 13:24:06 +02:00
support Revert "Defend against 'Host' header injection" 2016-08-08 13:02:44 +02:00
tasks Replace static issue fixtures by script (!6059) 2016-10-28 14:02:17 +02:00
banzai.rb Add markdown cache columns to the database, but don't use them yet 2016-10-07 02:54:25 +01:00
disable_email_interceptor.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
event_filter.rb Differentiate the expire from leave event 2016-10-20 00:26:45 +00:00
expand_variables.rb Update support for dynamic environments 2016-09-19 10:07:13 +02:00
extracts_path.rb Improve ExtractsPath logic related to atom format 2016-10-15 01:36:05 +03:00
file_size_validator.rb
file_streamer.rb
gitlab.rb Update `Gitlab.com?` to support staging 2016-06-27 15:10:36 -04:00
gt_one_coercion.rb
repository_cache.rb Use project ID in repository cache to prevent stale data from persisting across projects 2016-07-25 05:09:28 -07:00
static_model.rb
unfold_form.rb
uploaded_file.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
version_check.rb