Hello guys -
Would it be possible to add an additional scope with regards to activity participation?
For instance:
All In - All activity defined by the admin can be viewed by anyone
Opt Out - No activity will be viewable
Friends Only - All activity can only be viewed by friends
Eventually I think it would be awesome to provide each individual user with their own permissions with regards to which actions they would want to have displayed post-registration (the admin would just set the default text that would be displayed), sort of like a Privacy Settings, but at least the suggestion above would give them some sort of control besides on/off...
Thoughts?
Comments
Comment #1
Scott Reynolds commentedMoving this into 2.x branch. What needs to happen is a drupal_alter() right after we build all the access records but before we add them to the query. What this allows is some module to do just what is described. It can alter out things that don't belong. Whether it be all 'og' access types, remove all activity messages for a certain user. Crazy-ness can ensue :-D
Comment #2
Scott Reynolds commentedHere is how you make it work for D6 2.x
What that does is allow another module to remove grant records. So its real easy to write a module that allows users to pick people to ignore from their activity stream. It also makes it possible for a module to allow users to say "Don't show my activity in anyones feed" And any and all combination inbetween.
Comment #3
Scott Reynolds commentedreview it plz
Comment #4
Scott Reynolds commentedwith this patch it becomes really easy to write in a module that says "only friends actions go into the feed"
As far as the others that doesn't seem like this provides a mechism for them. I thought it had, but trying to do an example has become hard. I know what the SQL should look like though. It needs to bind directly to the {activity_messages}.uid and say "none of these". So whats needed is {activity_messages}.uid NOT IN (2,3,54,6) where those are the private uids.
Comment #5
sirkitree commentedThis looks good, so I'm thinking of a simple use case for this to illustrate and put into /modules/node.activity.inc before we actually put it in.
Desired result:
A setting at /user/%/activity/settings which gives a listing of accessible content types. Each content type to which the user has access has a dropdown of available options as listed in the original request.
label - Who can see your activity of this type?: Everyone, Nobody, Friends (Friends would be altered in by the friend module)
Maybe displayed as a table:
________________________________________________
| Content types: (derived from perms) | Permission levels: |
-------------------------------------------------------------------
| Photo | Dropdown |
-------------------------------------------------------------------
| Story | Dropdown |
-------------------------------------------------------------------
Comment #6
andypostLooks promising but what is the storage for this kind of permissions?
#5 about UI /user/%/activity/privacy (suppose settings is different)
Comment #7
sirkitree commentedBasically we've sorta scrapped that UI i have illustrated above, instead we're leaning towards giving the user a list of any of the triggers that implement activity and allowing them to opt out of them. We pretty much have that working (not yet committed) and then we can hopefully work on more fine-grained permissions in order to allow say, a group to view certain activity, but not all of your friends. here's a screenshot to illustrate where it's going.

Comment #8
sirkitree commentedI'm contemplating the need to extend this. Currently it's either all or nothing - but I'm wondering if we can use the hook_activity_access_grants in order to provide a list controls. So for each of these item listed in the above screenshot, you have a dropdown that lists [flag_friend] [community] / [og] though the english would have to be something like, Do not show this to: groups (then list groups?) OR Do not show this to: my friends (and list particular friends?)
I dunno - maybe to complicated for now.
I'm going to make this as fixed and update the title for now. But if it comes up in the future, let's keep this issue in mind.