gitlab-org--gitlab-foss/app/models
Douwe Maan 130c8a5198 Merge branch 'feature/precalculate-authorized-projects' into 'master'
Precalculate authorized projects in database

## What does this MR do?
It caches user's authorized projects in database instead of using multiple unions, which should simplify and speed-up things since this operation (getting authorized projects) is used a lot.

## Are there points in the code the reviewer needs to double check?
Did we miss a scenario where we need to refresh the list of projects?

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) 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
  - [x] 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?
#23150 

See merge request !6839
2016-11-18 19:42:17 +00:00
..
ci
concerns Merge branch 'feature/precalculate-authorized-projects' into 'master' 2016-11-18 19:42:17 +00:00
cycle_analytics
hooks
issue
members
merge_request
network
project_services
protected_branch
.gitkeep
ability.rb
abuse_report.rb
appearance.rb
application_setting.rb
audit_event.rb
award_emoji.rb
blob.rb
board.rb
broadcast_message.rb
chat_name.rb
commit.rb
commit_range.rb
commit_status.rb
compare.rb
cycle_analytics.rb
deploy_key.rb
deploy_keys_project.rb
deployment.rb
diff_note.rb
discussion.rb
email.rb
environment.rb
event.rb
external_issue.rb
forked_project_link.rb
generic_commit_status.rb
global_label.rb
global_milestone.rb
group.rb
group_label.rb
guest.rb
identity.rb
issue.rb
issue_collection.rb
key.rb
label.rb
label_link.rb
label_priority.rb
legacy_diff_note.rb
lfs_object.rb
lfs_objects_project.rb
list.rb
member.rb
merge_request.rb
merge_request_diff.rb
merge_requests_closing_issues.rb
milestone.rb
namespace.rb
note.rb
notification_setting.rb
oauth_access_token.rb
personal_access_token.rb
personal_snippet.rb
project.rb Merge branch 'feature/precalculate-authorized-projects' into 'master' 2016-11-18 19:42:17 +00:00
project_authorization.rb
project_feature.rb
project_group_link.rb
project_import_data.rb
project_label.rb
project_snippet.rb
project_team.rb
project_wiki.rb
protected_branch.rb
release.rb
repository.rb
security_event.rb
sent_notification.rb
service.rb
snippet.rb
spam_log.rb
subscription.rb
todo.rb
tree.rb
trending_project.rb
u2f_registration.rb
user.rb Merge branch 'feature/precalculate-authorized-projects' into 'master' 2016-11-18 19:42:17 +00:00
user_agent_detail.rb
users_star_project.rb
wiki_page.rb