noosfero | Takes wall_access into consideration when displaying activities (!1105)

Gabriel Silva gitlab at mg.gitlab.com
Fri Feb 3 00:20:03 BRST 2017


New Merge Request !1105

https://gitlab.com/noosfero/noosfero/merge_requests/1105

Project:Branches: gabrielssilva/noosfero:wall_notifications to noosfero/noosfero:master
Author:    Gabriel Silva
Assignee:  

Right now, `wall_access` is never taken in consideration when displaying/filtering activity notifications.

I've changed only the `hidden_for?` of the presenter. The `display_to?` methods remain unmodified since I believe the `wall_access` attribute should not affect how contents are displayed, just walls.

Considering that every notification has a source profile (`owner`) and a target profile (`target`), the notification will be displayed depending on the visibility of the wall of some profile.

* A user follows the `owner`:
    * The wall is visible: the activity notification ***will be displayed*** for the user;
    * The wall is restricted: the activity notification ***will not be displayed*** for the user;
* A user doesn't follow the `owner`, but follows the `target`:
    * The activity notification ***will not be created*** for the user (except when `owner == target`).

The considered profile will depend on the target type:

* Organization: the organization itself;
* Article: the profile it was published in;
* Scrap: the receiver;
* None of the cases above: it fails back to the `owner`.

All scenarios above are valid for public `target` profiles. Notifications with private `target` profiles are never displayed. Furthermore, only the wall and profile visibilities of the `target` are taken in consideration when displaying activity notifications.

Regarding notifications not being created when a user follows the `target` and does not follow the `owner`, it is a scenario not implemented by the `NotifyActivityToProfilesJob`. Only notifications of activities of profiles you follow are sent to you. Notifications of activities that affect profiles you follow are not.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170203/1491015c/attachment.html>


More information about the Noosfero-dev mailing list