gitlab-ce/spec/controllers
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
..
admin Only show one error message for an invalid email 2016-10-27 15:46:28 -04:00
ci
groups Refactor create member tests from group_members_controller_spec 2016-10-24 13:14:00 +03:00
import modify github import JS and controller so we can now specify a namespace and/or name for a project. 2016-09-20 10:14:39 +02:00
oauth
profiles
projects Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
abuse_reports_controller_spec.rb
application_controller_spec.rb
autocomplete_controller_spec.rb
blob_controller_spec.rb
groups_controller_spec.rb
health_check_controller_spec.rb
help_controller_spec.rb
invites_controller_spec.rb
notification_settings_controller_spec.rb
projects_controller_spec.rb Add visibility level to project repository 2016-10-17 18:12:18 -02:00
registrations_controller_spec.rb
root_controller_spec.rb
sent_notifications_controller_spec.rb Fix initial implementation to actually render the unsubscribe page 2016-09-20 09:52:57 +02:00
sessions_controller_spec.rb Restrict failed login attempts for users with 2FA 2016-10-04 15:01:38 +01:00
snippets_controller_spec.rb Add missing tests for download snippet 2016-10-13 18:08:15 +05:00
uploads_controller_spec.rb
users_controller_spec.rb Enforce the fork_project permission in Projects::CreateService 2016-09-27 13:17:56 +01:00