gitlab-org--gitlab-foss/app/models
Robert Speicher dac2e0c43d Merge branch 'ability-batch-issue-checking' into 'master'
Optimize checking if a user can read multiple issues

## What does this MR do?

This optimizes various parts of the code so it can more efficiently check if a user can read a list of issues.

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

Yes, in particular `Ability.issues_readable_by_user` should be checked to make sure it correctly allows/restricts access to issues.

## Why was this MR needed?

Currently the general approach to checking if one can read an issue is to iterate over the issues to check and call `can?(user, :read_issue, issue)` for every issue. This is not efficient as the same work has to be done for every issue.

## What are the relevant issue numbers?

* #15607 
* #17463

See merge request !5370
2016-07-29 16:54:37 +00:00
..
ci Check for Ci::Build artifacts at database level 2016-07-29 14:08:41 +02:00
concerns Merge branch 'rubocop/enable-access-modifiers-cops' into 'master' 2016-07-29 15:58:09 +00:00
hooks Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
members Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
network Enable Style/SpaceAfterComma Rubocop cop 2016-06-29 15:23:44 +02:00
project_services Move color-logic into HipchatService#HipchatService 2016-07-27 11:29:05 +02:00
protected_branch Implement final review comments from @rymai. 2016-07-29 15:20:39 +05:30
.gitkeep
ability.rb Method for returning issues readable by a user 2016-07-29 12:51:18 +02:00
abuse_report.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
appearance.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
application_setting.rb Default to manual input for domain_whitelist, syntax fixes and added new tests. 2016-07-18 17:53:43 -05:00
audit_event.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
award_emoji.rb Add emoji.rb in lib/gitlab instead of using the gitlab_emoji gem. 2016-06-29 14:53:09 -06:00
blob.rb Ensure relative paths for video are rewritten as we do for images 2016-07-26 10:22:17 +02:00
broadcast_message.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
commit.rb Add specs for caching commit author 2016-07-27 16:42:38 -07:00
commit_range.rb Fix comment for project argument in commit_range.rb 2016-06-20 11:12:04 -07:00
commit_status.rb Workaround MySQL with INNER JOIN: 2016-07-21 01:10:08 +08:00
deploy_key.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
deploy_keys_project.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
deployment.rb Improve manual actions code and add model, service and feature tests 2016-07-18 14:46:20 +02:00
diff_note.rb Make DiffNote#update_position private 2016-07-07 16:13:55 -04:00
discussion.rb Add Discussion model to represent MR/diff discussion 2016-07-20 16:18:18 -06:00
email.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
environment.rb Revert "squashed merge and fixed conflicts" 2016-06-16 12:59:07 +02:00
event.rb Use a more future-proof check for Note/LegacyDiffNote 2016-07-06 10:08:42 +02:00
external_issue.rb
forked_project_link.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
generic_commit_status.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
global_label.rb
global_milestone.rb
group.rb Dumb-down avatar presence check in avatar_url methods 2016-07-05 10:51:11 -04:00
identity.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
issue.rb Method for returning issues readable by a user 2016-07-29 12:51:18 +02:00
key.rb Remove Duplicated keys add UNIQUE index to fingerprint 2016-06-20 13:29:04 +02:00
label.rb Simplify regex for string-based multi-word label surrounded in quotes 2016-07-13 16:01:27 -03:00
label_link.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
legacy_diff_note.rb Reduce number of queries made for merge_requests/:id/diffs 2016-07-28 16:52:19 +02:00
lfs_object.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
lfs_objects_project.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
member.rb Incorporate review comments 2016-07-26 16:53:39 -07:00
merge_request.rb Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' "" 2016-07-18 10:16:56 +02:00
merge_request_diff.rb Squashed - fix encoding issue 2016-07-19 09:59:54 +02:00
milestone.rb use has_many relationship with events 2016-07-01 15:34:10 +02:00
namespace.rb Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
note.rb Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page 2016-07-23 14:51:52 -06:00
notification_setting.rb Exclude projects pending delete from notifications 2016-07-07 20:49:17 +01:00
oauth_access_token.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
personal_access_token.rb
personal_snippet.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
project.rb Fix all specs related to changes in !5081. 2016-07-29 15:20:39 +05:30
project_group_link.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
project_import_data.rb add missing attribute to attr_encrypted so it is fully backwards-compatible 2016-06-28 09:55:19 +02:00
project_snippet.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
project_team.rb Implement review comments from @dbalexandre. 2016-07-29 15:20:39 +05:30
project_wiki.rb Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
protected_branch.rb Use Gitlab::Access to protected branch access levels. 2016-07-29 15:20:39 +05:30
release.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
repository.rb Update to gitlab_git 10.4.1 and take advantage of preserved Ref objects 2016-07-28 12:24:47 -04:00
security_event.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
sent_notification.rb Allow SentNotification#position to be set as string or hash 2016-07-11 12:21:05 -05:00
service.rb Make Service.external_wikis return only active external wikis 2016-07-21 10:36:02 +02:00
snippet.rb Merge branch 'feature/custom-highlighting' into 'master' 2016-06-28 08:42:42 +00:00
spam_log.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
spam_report.rb
subscription.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
todo.rb Add approval required todos 2016-07-12 19:01:09 +01:00
tree.rb
u2f_registration.rb Add a U2fRegistrations table/model. 2016-06-06 12:50:31 +05:30
user.rb Merge branch '18586-user-authorized_projects-is-slow' into 'master' 2016-07-20 20:35:11 +00:00
users_star_project.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
wiki_page.rb WikiPage should have a slug even when not persisted. 2016-07-25 09:22:47 +05:30