gitlab-org--gitlab-foss/app/models
Yorick Peterse 580d250166
Refactor Participable
There are several changes to this module:

1. The use of an explicit stack in Participable#participants
2. Proc behaviour has been changed
3. Batch permissions checking

== Explicit Stack

Participable#participants no longer uses recursion to process "self" and
all child objects, instead it uses an Array and processes objects in
breadth-first order. This allows us to for example create a single
Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using
a ReferenceExtractor removes the need for running potentially many SQL
queries every time a Proc is called on a new object.

== Proc Behaviour Changed

Previously a Proc in Participable was expected to return an Array of
User instances. This has been changed and instead it's now expected that
a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return
value of the Proc is ignored.

== Permissions Checking

The method Participable#participants uses
Ability.users_that_can_read_project to check if the returned users have
access to the project of "self" _without_ running multiple SQL queries
for every user.
2016-06-01 16:22:35 +02:00
..
ci Merge branch 'feature/runner-config-untagged-jobs' into 'master' 2016-05-19 21:54:33 +00:00
concerns Refactor Participable 2016-06-01 16:22:35 +02:00
hooks Merge branch 'hook-docs-behavior' into 'master' 2016-05-11 16:34:00 +00:00
members Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
network Enable Style/InfiniteLoop Rubocop cop 2016-05-23 19:50:31 +02:00
project_services Seconds plural slack 2016-05-24 10:54:16 +02:00
.gitkeep
ability.rb Refactor Participable 2016-06-01 16:22:35 +02:00
abuse_report.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
appearance.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
application_setting.rb Serialize application setting as Array by default 2016-05-22 22:31:28 -07:00
audit_event.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
blob.rb Properly handle bigger files 2016-04-28 21:28:39 +02:00
broadcast_message.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
commit.rb Refactor Participable 2016-06-01 16:22:35 +02:00
commit_range.rb Don't modify arguments in CommitRange#initialize 2016-05-26 13:58:01 +02:00
commit_status.rb Merge branch 'create-todo-on-failing-build' into 'master' 2016-05-19 21:18:22 +00:00
deploy_key.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
deploy_keys_project.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
email.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
event.rb Reduce duplication and branching logic in EventsHelper 2016-05-16 14:52:04 -05:00
external_issue.rb
forked_project_link.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
generic_commit_status.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
global_label.rb
global_milestone.rb
group.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
identity.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
issue.rb Refactor Participable 2016-06-01 16:22:35 +02:00
jira_issue.rb
key.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
label.rb Merge branch 'remove-annotate-gem' into 'master' 2016-05-10 09:08:30 +00:00
label_link.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
legacy_diff_note.rb Clean up LegacyDiffNote somewhat 2016-05-13 17:31:58 -05:00
lfs_object.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
lfs_objects_project.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
member.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
merge_request.rb Allows MR authors to have the source branch removed when merging the MR 2016-05-20 11:30:03 +02:00
merge_request_diff.rb Maintain commit order in MRs 2016-05-18 17:14:55 +01:00
milestone.rb Address Yorick's feedback 2016-05-18 23:45:25 -05:00
namespace.rb Merge branch 'docker-registry' into docker-registry-view 2016-05-13 17:15:01 -05:00
note.rb Refactor Participable 2016-06-01 16:22:35 +02:00
notification_setting.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
oauth_access_token.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
personal_snippet.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
project.rb Fixed project model tests 2016-05-25 09:44:33 +01:00
project_group_link.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
project_import_data.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
project_snippet.rb Refactor Participable 2016-06-01 16:22:35 +02:00
project_team.rb
project_wiki.rb Use the relative url prefix for links in Wiki 2016-05-13 22:42:07 +02:00
protected_branch.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
release.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
repository.rb Dropdown implementation 2016-05-20 15:58:36 -05:00
security_event.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
sent_notification.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
service.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
snippet.rb Refactor Participable 2016-06-01 16:22:35 +02:00
spam_log.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
spam_report.rb
subscription.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
todo.rb Create a todo on failing MR build 2016-05-17 10:17:45 +01:00
tree.rb
user.rb Revert "Merge branch 'issues/15127' into 'master'" 2016-05-19 14:09:24 +00:00
users_star_project.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
wiki_page.rb add slack notifications for wiki pages 2016-04-20 08:25:40 +08:00