[Git][noosfero/noosfero][master] 2 commits: profile-activities: generate and filter private notifications

Rodrigo Souto gitlab at mg.gitlab.com
Tue Sep 6 18:01:03 BRT 2016


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
18ac7d64 by Rodrigo Souto at 2016-09-06T14:29:41-03:00
profile-activities: generate and filter private notifications

Notifications of private profiles or provite contents were not being
generated. This patch generates these notifications and filter
activities being displayed to the user according to her/his permissions.

Making this work through pure sql is just too complex. It was needed to
filter results after pagination, for performance reasons, and perform
some workarounds to not mess with the paginated results.

PS: Also refactoring presenters infra

- - - - -
d6a6f2a4 by Rodrigo Souto at 2016-09-06T21:00:43+00:00
Merge branch 'private-notifications' into 'master'

profile-activities: generate and filter private notifications

Notifications of private profiles or provite contents were not being
generated. This patch generates these notifications and filter
activities being displayed to the user according to her/his permissions.

Making this work through pure sql is just too complex. It was needed to
filter results after pagination, for performance reasons, and perform
some workarounds to not mess with the paginated results.

See merge request !1009
- - - - -


30 changed files:

- app/controllers/public/profile_controller.rb
- app/jobs/notify_activity_to_profiles_job.rb
- app/models/article.rb
- app/models/favorite_enterprise_person.rb
- app/models/profile.rb
- app/models/scrap.rb
- app/models/uploaded_file.rb
- + app/presenters/activity/generic.rb
- + app/presenters/activity_presenter.rb
- app/presenters/generic.rb → app/presenters/file/generic.rb
- app/presenters/image.rb → app/presenters/file/image.rb
- lib/file_presenter.rb → app/presenters/file_presenter.rb
- app/views/file_presenter/_image.html.erb
- app/views/profile/_default_activity.html.erb
- app/views/profile/_favorite_enterprise.html.erb
- app/views/profile/_leave_scrap.html.erb
- app/views/profile/_profile_activities_list.html.erb
- app/views/profile/_profile_network.html.erb
- app/views/profile/_profile_network_activities.html.erb
- + lib/presenter.rb
- plugins/metadata/lib/metadata_plugin/controllers.rb
- plugins/products/models/products_plugin/product.rb
- test/functional/profile_controller_test.rb
- + test/unit/activity_presenter/generic.rb
- + test/unit/activity_presenter_test.rb
- test/unit/approve_article_test.rb
- test/unit/article_test.rb
- test/unit/notify_activity_to_profiles_job_test.rb
- test/unit/scrap_test.rb
- test/unit/textile_article_test.rb


The diff was not included because it is too large.


View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/9f3246dbc3df4a4f2e7c270b8ac9114717162491...d6a6f2a408ce2bbe17c4fa302f37a62d07b5f1f5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160906/cbc351c0/attachment.html>


More information about the Noosfero-dev mailing list