gitlab-org--gitlab-foss/lib/gitlab
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
..
auth Move logic to check ci? or lfs_deploy_token? to Gitlab::Auth::Result 2016-09-20 11:03:10 +02:00
backend Reassign secret token when regenerating one 2016-10-13 10:04:58 +02:00
badge Fix tests 2016-08-26 15:40:12 +08:00
bitbucket_import Rename gl_user_id to gitlab_user_id in importer classes 2016-09-08 11:57:22 +10:00
checks Avoid protected branches checks when verifying access without branch name 2016-09-13 11:50:13 +02:00
ci Merge branch '22191-delete-dynamic-envs-mr' into 'master' 2016-10-19 07:53:05 +00:00
conflict Add blob_ace_mode to conflict content response 2016-10-13 14:16:35 -05:00
data_builder Simplify the name for data builder, feedback: 2016-08-12 16:09:29 +08:00
database Implement fourth round of comments from @DouweM. 2016-09-21 09:57:14 +05:30
diff Fix the diff in the merge request view when converting a symlink to a regular file. 2016-10-17 18:09:34 +02:00
downtime_check Better formatting for downtime check messages 2016-08-17 12:15:20 +02:00
email Preserve note_type and position for notes from emails 2016-10-20 16:18:53 +08:00
fogbugz_import Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
gfm Keep cross project reference logic in GroupLabel#to_reference 2016-10-19 14:58:26 -02:00
git Clean environment variables when running git hooks 2016-09-15 08:51:55 +03:00
github_import Merge branch 'adam-fix-labels-find-or-create' into 'master' 2016-10-28 15:01:59 +00:00
gitlab_import Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2016-09-08 17:43:19 +03:00
google_code_import Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
graphs
import_export Update specs to cope with new label types and priorities 2016-10-19 14:58:28 -02:00
ldap Log LDAP lookup errors and don't swallow unrelated exceptions 2016-09-28 07:44:58 +02:00
markdown
metrics Adds response mime type to transaction metric action when it's not HTML 2016-08-25 16:33:41 +02:00
middleware Fix typo in gitlab-workhorse header 2016-08-19 12:25:52 +02:00
o_auth Merge branch 'master' into dev-master 2016-07-02 22:58:21 +02:00
request_profiler Rails prefers require_dependency so that it won't require twice: 2016-08-09 06:48:23 +00:00
saml Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
sanitizers Refactored SVG sanitizer 2016-06-12 21:05:58 -04:00
sherlock
sidekiq_middleware Merge branch 'aiionx_sidekiq_log_patch' into 'master' 2016-10-03 14:20:18 +00:00
slash_commands Fix behavior around commands with optional arguments 2016-08-18 14:29:49 -05:00
sql
template Load issues and merge requests templates from repository 2016-08-16 15:50:17 -03:00
access.rb Allow Member.add_user to handle access requesters 2016-09-28 09:43:00 +02:00
app_logger.rb
asciidoc.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
auth.rb Handle LFS token creation and retrieval in the same method, and in the same Redis connection. 2016-09-28 12:13:48 -05:00
award_emoji.rb Upgrade Gemojione from 2.6.1 to 3.0.1. 2016-07-18 10:40:16 -06:00
bitbucket_import.rb
blame.rb add custom highlighting via .gitattributes 2016-06-27 14:17:49 -07:00
changes_list.rb api for generating new merge request 2016-08-11 23:37:00 +07:00
closing_issue_extractor.rb Don’t close issues on original project from a fork 2016-08-04 12:38:08 +02:00
color_schemes.rb
config_helper.rb
contributions_calendar.rb Replace contributions calendar timezone payload with dates 2016-09-16 14:38:59 -05:00
contributor.rb
current_settings.rb Remove use of USE_DB environment variable in code 2016-09-23 10:50:46 +02:00
database.rb Fix methods visibility in gitlab database module 2016-07-19 15:12:14 +02:00
devise_failure.rb
downtime_check.rb Added checks for migration downtime 2016-07-20 12:41:56 +02:00
ee_compat_check.rb Disable Rails/Output cop since it makes no sense here 2016-10-24 21:19:46 +02:00
emoji.rb Convert UTF-8 Emoji to Gitlab emoji 2016-10-13 13:18:30 +02:00
exclusive_lease.rb Don't schedule ProjectCacheWorker unless needed 2016-10-25 16:02:36 +02:00
git.rb Add spec covering 'committer_hash' 2016-09-20 10:15:43 -07:00
git_access.rb Rename capabilities to authentication_abilities 2016-09-16 11:12:21 +02:00
git_access_status.rb Ensure to_json methods take optional argument 2016-07-20 11:14:06 +01:00
git_access_wiki.rb Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' "" 2016-07-18 10:16:56 +02:00
git_logger.rb
git_post_receive.rb Log base64-decoded PostReceive arguments 2016-08-05 15:00:12 +02:00
git_ref_validator.rb
gl_id.rb Revert "squashed merge and fixed conflicts" 2016-06-16 12:59:07 +02:00
gon_helper.rb Stop putting private tokens in Gon 2016-09-19 12:27:37 +01:00
highlight.rb use the proper variable names o_O 2016-07-14 12:21:22 -07:00
identifier.rb Refactor Gitlab::Identifier 2016-10-05 12:40:17 +02:00
import_export.rb Fix import/export labels to cope with project and group labels. Added relevant specs. 2016-10-19 14:58:25 -02:00
import_formatter.rb
import_sources.rb Remove gitorious 2016-08-25 10:10:10 +01:00
incoming_email.rb
issues_labels.rb Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
key_fingerprint.rb Enable Style/UnneededCapitalW Rubocop cop 2016-06-30 13:31:52 +02:00
lazy.rb
lfs_token.rb Fix race condition that can be triggered if the token expires right after we retrieve it, but before we can set the new expiry time. 2016-09-29 10:25:26 -05:00
logger.rb
mail_room.rb Updated mail_room and added sentinel support to Reply by Email 2016-10-26 05:02:47 +02:00
markup_helper.rb
metrics.rb Tracking of custom events 2016-08-17 10:04:04 +02:00
optimistic_locking.rb Make retry_lock to not be infinite 2016-10-27 12:34:35 +01:00
other_markup.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
popen.rb Fix Gitlab::Popen.popen thread-safety issue 2016-09-13 21:39:46 +02:00
production_logger.rb
project_search_results.rb Refactoring find_commits functionality 2016-10-20 12:45:34 +03:00
protocol_access.rb Default Git access protocol to web 2016-07-05 16:54:22 -05:00
recaptcha.rb
redis.rb Updated mail_room and added sentinel support to Reply by Email 2016-10-26 05:02:47 +02:00
reference_extractor.rb
regex.rb Correct namespace validation to forbid bad names #21077 2016-10-07 13:46:59 -05:00
repository_check_logger.rb
request_profiler.rb Profile requests when a header is passed 2016-07-26 20:06:09 +02:00
routing.rb
search_results.rb Clean up search result classes 2016-09-06 10:12:55 +03:00
seeder.rb
sentry.rb Fix Sentry not reporting right program for Sidekiq workers 2016-08-25 19:42:52 -07:00
sherlock.rb
sidekiq_logger.rb
snippet_search_results.rb Clean up search result classes 2016-09-06 10:12:55 +03:00
themes.rb Refactor gitlab themes module to make it singleton 2016-07-19 15:12:14 +02:00
timeless.rb Add Timeless helper module to prevent updated_at from being updated 2016-07-06 18:50:58 -04:00
upgrader.rb
uploads_transfer.rb
url_builder.rb url_builder: handle project snippets 2016-08-24 10:32:12 -04:00
url_sanitizer.rb spec and fix for sanitize method 2016-07-11 09:01:09 +02:00
user_access.rb Improve EE compatibility with protected branch access levels. 2016-08-16 12:08:10 +05:30
utils.rb Use travel_to instead of dependency injection, feedback: 2016-08-19 16:57:25 +08:00
version_info.rb
visibility_level.rb
workhorse.rb Explain the extra chmod 2016-09-26 14:21:39 +02:00