Problem/Motivation

I currently use Open Social in my organisation as an internal social plateform in witch we wish to have basically three types of groups:
- "Workshops" groups, used by employees and external experts.
- "Internal organisation" groups, mostly dedicated to human ressources information and departement's workflows
- "Unformal" groups, restricted to the employees dedicated to the social life of the company in wich we can share interests for sport, music... or organise friendly lunch etc.

I restricted access rights the most I could using drupal'score roles and group's roles, but I can't manage to prevent users from seeing activities on home stream of groups they should not even know they exist.

Example 1: an external experts member of a high level technical group can see in the home stream that an employee posted on "who's the chef next lunch?" group. Even if that external person can't actually see the post, the article or the stream of that group, it is not professional to see the notification. "unformal" groups activities should not appear to external people in a professional context.

Proposed resolution

Solution 1 : remove from the home stream all activities related to (closed or open) groups the user is not member of.

Solution 2 : create a "secret" group like in Facebook, which will be not referenced on "all groups" page and its activities referenced in streams only for members.

So far, thank you for the great job already done!

Comments

FleurJ created an issue. See original summary.

FleurJ’s picture

note about the first solution proposed: I tried to change the view's settings to add a new filter but it did'nt work. Maybe I just did'nt configured properly the filter? In this case, what would be the right filter ?

bramtenhove’s picture

Component: Code (back-end) » Groups
Priority: Normal » Minor
socialnicheguru’s picture

in your use case can a secret group even be seen in the list if you are not part of the group?

marqpdx’s picture

Hello, good timing, just working on this myself.

I believe the use case is, that if you are not part of a secret group, then you will never see that group or any of its content listed or shown anywhere on the entire site ever; you'll only officially hear about it if you get invited, and then you can join...

There just needs to be that level of privacy for OS to serve everybody, b/c the way i think about it is, take the innermost unit, each person's handful of secret groups where we have business meetings w/ colleagues or whatever, and outside of that is the current Closed group which is publicly visible and people can ask to join. And then there is the wider ring of public groups. That way you then can have the fullest range of conversations possible.

Anyone know if there are settings that can be added to Open Social Groups to implement this, or where in the code?

Thanks,
m

socialnicheguru’s picture

Also grey out the visibility settings.

marqpdx’s picture

OK, i was working w/ this yesterday, and it might be easier than i was thinking.

1) i turned on Views UI
2) i created a 4th Group Type ("Secret", though i think the name "Hidden Private" might be better)
3) then i adjusted the settings for that group to hide all visibility from non-members
4) then i adjusted the /all-groups view to exclude "Secret" groups, and we were almost there.

The other views would need to be adjusted, but it seems that this would serve what we have been discussing, having a Group Type that would be known and visible *only* to members.

I still have to figure a good way to do the invite, but i am encouraged that the structure of Open Social made this so easy.

If we like this, we (i can work on it) can update the install profile to create this 4th group type, but the above steps were pretty straightforward and workable.

How is this sounding?

Thx
m

socialnicheguru’s picture

Great.

we would also have to make sure that secret group activity does not show up unless you are a member of the group.

Is there a way to signify if a group is open, closed, secret, or public? An icon perhaps?

marqpdx’s picture

hi SocialNicheGuru

First, i am thinking that the term "Private" is better than "Secret". What do you think?

Second, so far, in terms of your first question, making sure that group activity doesn't show up unless you are a member of a "private/secret" group seems to require simply adjusting the public Views (like All Groups) so that `Group Type <> "Private"`, which will filter out Secret (or Private) groups. True, you won't see in the All Groups list the Private/Secret groups you are part of, but that seems ok.

What "All Groups" then means is "All publicly visible groups". If we really wanted Private groups that i belong to to show up in All Groups list (maybe w/ a special icon) we could further tweak the views (add "Is a member of" as a contextual filter or something). I don't think that's even needed, tbh, but we can figure that out.

The "My Groups" link (/user/%user/groups) would show all a person's groups, including secret/private ones.

Third, An icon would be nice, so it's clear.

A question: currently, the three default group types are built in code, yeah? And same for the default views?

Thx,

m

socialnicheguru’s picture

yes to your last question.

I see closed groups and private groups as being equal.
the only difference with private groups is that the group and content are not visible at all unless I am a member of the group

socialnicheguru’s picture

@marqpdx in comment #7 above, what permissions did you change in your number #3?

socialnicheguru’s picture

also is there a way to include a group if someone is a member?

I have not tried this but it looks promising: https://www.drupal.org/sandbox/dench0/2640652
this might help me view all public,open, and closed groups and those groups that I am a member of (which would include secret groups)

socialnicheguru’s picture

Ugghhh there is no views relationship between a group and being a group member. See https://www.drupal.org/project/group/issues/2971683

I wanted to setup a view filter

Exposed group type:
closed, public, open

or

group type: secret
user is a member of group <- no way to get here.

socialnicheguru’s picture

jaapjan’s picture

Title: Hide activities for non member group or create "secret" group type » Create "secret" group type/Private groups
ohorbatiuk’s picture

Version: 8.x-1.x-dev » 8.x-5.x-dev
Assigned: Unassigned » ohorbatiuk
Status: Active » Needs work
ohorbatiuk’s picture

Assigned: ohorbatiuk » Unassigned
Status: Needs work » Needs review
socialnicheguru’s picture

this important feature did not make it into the 5.0 version.
Can't wait until it does. We all need secret groups

jaapjan’s picture

Correct, unfortunately the PR is still work in progress. We are making progress though. I think we can consider this for a minor 5.x release if the impact on existing sites is not too much.

socialnicheguru’s picture

Can it be rerolled to test on 5.0?

applying the patch to 5.0 caused one minor error:

patching file modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php
Hunk #2 FAILED at 117.
1 out of 2 hunks FAILED -- saving rejects to file modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php.rej

more modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php.rej
--- modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php
+++ modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php
@@ -117,8 +117,8 @@ public function viewsForm(array &$form, FormStateInterface $form_state) {
     $wrapper['multipage']['list']['#title'] = $this->t('See selected members on other pages');
 
     // We don't show the multipage list if there are no items selected.
-    if (count($wrapper['multipage']['list']['#items']) < 1) {
-      $wrapper['multipage']['list'] = '';
+    if (isset($wrapper['multipage']['list']['#items']) && count($wrapper['multipage']['list']['#items']) < 1) {
+      $wrapper['multipage']['list'] = [];
     }
socialnicheguru’s picture

Will this be in 5.2?

jaapjan’s picture

After discussion it will be in 6.0 instead since we believe it is too big for a minor release. Expected delivery in July :-) Can't wait for that release as it will make the groups in OS way more flexible!

ronaldtebrake’s picture

Status: Needs review » Fixed

PR has been reviewed and merged and will land in 6.0!

socialnicheguru’s picture

When will 6 hit?

  • Kingdutch committed 14e2f62 on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Add use statement for new hooks and use the...
  • Kingdutch committed 1b7dda8 on 8.x-6.x
    Issue #2898087 by Kingdutch: Improve API hook description
    
  • ronaldtebrake committed 2d33ec0 on 8.x-6.x
    Issue #2898087 by ronaldtebrake: add patch to make file
    
  • RobertRagas committed 31610f0 on 8.x-6.x
    Issue #2898087 by robertragas: add patch to fix problem cleaning up...
  • Kingdutch committed 31b524c on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Create a configuration for a secret group based...
  • Kingdutch committed 358f9bf on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Show secret groups in the "Newest groups" block...
  • Kingdutch committed 424d1a6 on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Prohibit changing group type.
    
  • ronaldtebrake authored 6c7366f on 8.x-6.x
    Merge pull request #1281 from goalgorilla/feature/2898087
    
    Issue #...
  • Kingdutch committed 6cd09c1 on 8.x-6.x
    Issue #2898087 by Kingdutch: Remove the Secret Groups dependency on...
  • Kingdutch committed 8b08a04 on 8.x-6.x
    Issue #2898087 by Kingdutch: Use non-numeric keys for configuration...
  • RobertRagas committed 8da3add on 8.x-6.x
    Issue #2898087 by robertragas: change behat test tags, and users to test...
  • Kingdutch committed 9847c9b on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Show the "Secret group" item at the end of the...
  • Kingdutch committed a94920d on 8.x-6.x
    Issue #2898087 by Kingdutch: Fix group visibility for non-members...
  • Kingdutch committed b9f3233 on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Show 404 page instead of 403 page for secret...
  • RobertRagas committed bc84e42 on 8.x-6.x
    Issue #2898087 by robertragas: fix behat test by defining a group filter...
  • Kingdutch committed c6614ae on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Update closed groups description in Behat tests...
  • Kingdutch committed dcd4dc7 on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Add the "Social Group Secret" module as a...
  • Kingdutch committed dd9226b on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Update comments to some code.
    
  • Kingdutch committed e0eb578 on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Update descriptions for groups.
    
  • Kingdutch committed e339fa0 on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Hide secret groups for unpriviliged users.
    
    For...
  • Kingdutch committed ec98657 on 8.x-6.x authored by chmez
    Issue #2898087 by chmez: Add icon for secret groups.
    
  • ronaldtebrake committed f17f1fb on 8.x-6.x
    Issue #2898087 by ronaldtebrake: update small typo
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.