{"action":"created","issue":{"url":"https://api.github.com/repos/CFCommunity-net/buddypress-group-restrictions/issues/1","labels_url":"https://api.github.com/repos/CFCommunity-net/buddypress-group-restrictions/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/CFCommunity-net/buddypress-group-restrictions/issues/1/comments","events_url":"https://api.github.com/repos/CFCommunity-net/buddypress-group-restrictions/issues/1/events","html_url":"https://github.com/CFCommunity-net/buddypress-group-restrictions/issues/1","id":65701594,"number":1,"title":"Restricting Group Access","user":{"login":"BoweFrankema","id":855037,"avatar_url":"https://avatars.githubusercontent.com/u/855037?v=3","gravatar_id":"","url":"https://api.github.com/users/BoweFrankema","html_url":"https://github.com/BoweFrankema","followers_url":"https://api.github.com/users/BoweFrankema/followers","following_url":"https://api.github.com/users/BoweFrankema/following{/other_user}","gists_url":"https://api.github.com/users/BoweFrankema/gists{/gist_id}","starred_url":"https://api.github.com/users/BoweFrankema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BoweFrankema/subscriptions","organizations_url":"https://api.github.com/users/BoweFrankema/orgs","repos_url":"https://api.github.com/users/BoweFrankema/repos","events_url":"https://api.github.com/users/BoweFrankema/events{/privacy}","received_events_url":"https://api.github.com/users/BoweFrankema/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"henrywright","id":1963288,"avatar_url":"https://avatars.githubusercontent.com/u/1963288?v=3","gravatar_id":"","url":"https://api.github.com/users/henrywright","html_url":"https://github.com/henrywright","followers_url":"https://api.github.com/users/henrywright/followers","following_url":"https://api.github.com/users/henrywright/following{/other_user}","gists_url":"https://api.github.com/users/henrywright/gists{/gist_id}","starred_url":"https://api.github.com/users/henrywright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henrywright/subscriptions","organizations_url":"https://api.github.com/users/henrywright/orgs","repos_url":"https://api.github.com/users/henrywright/repos","events_url":"https://api.github.com/users/henrywright/events{/privacy}","received_events_url":"https://api.github.com/users/henrywright/received_events","type":"User","site_admin":false},"milestone":null,"comments":20,"created_at":"2015-04-01T14:37:10Z","updated_at":"2015-04-03T11:59:54Z","closed_at":null,"body":"### 1: Site admin selects which xProfile fields are \"available\" for a Group Admin to restrict access for. \r\n\r\nFor example the site admin chooses xProfile field \"Your Relationship with CF\" as a field that can restrict group access.\r\n\r\nIn this example the field contains the following values:\r\n\r\n- I have CF\r\n- My partner has CF\r\n- A family member has CF\r\n\r\n### 2: On the \"Access Control\" tab the Group Admin now gets the following new option\r\n\r\n\"Enable access to members based on the profile field \"Your Position in our Company\"\r\n\r\n[    ]  I have CF\r\n[ x ]  My partner has CF\r\n[    ]  A family member has CF\r\n\r\n*Community members who have filled in <strong>My Partner has CF</strong> on their profile, are able to join your group! \r\n\r\n### 3: Displaying the Groups/Access Control message \r\n\r\nThere are a few possible ways this functionality could be implemented. \r\n\r\n*Hide Restricted Groups* - Only the groups that the users has access to are shown. This would requiring filtering the Groups Loop per user. I think this could be performance heavy but it would be an interesting option for sure. This way a user simply does not know what they are missing and would lead to a more pleasant experience (being unable to join an interesting group might be unpleasant)\r\n\r\n- The \"blocked\" groups are still shown but a basic (customisable) message is shown on the group page \"You are unable to join this group because it's meant for a <strong>My partner has CF</strong> only. This could be added to the groups loop as well. \r\n\r\n- Everything stays the same but as soon as a user presses the \"Join Group\" button the xProfile check is done and then the message is displayed. This is the easiest solution but also by far the most unpleasant for the user. Let's try and avoid this one :-)"},"comment":{"url":"https://api.github.com/repos/CFCommunity-net/buddypress-group-restrictions/issues/comments/89267235","html_url":"https://github.com/CFCommunity-net/buddypress-group-restrictions/issues/1#issuecomment-89267235","issue_url":"https://api.github.com/repos/CFCommunity-net/buddypress-group-restrictions/issues/1","id":89267235,"user":{"login":"henrywright","id":1963288,"avatar_url":"https://avatars.githubusercontent.com/u/1963288?v=3","gravatar_id":"","url":"https://api.github.com/users/henrywright","html_url":"https://github.com/henrywright","followers_url":"https://api.github.com/users/henrywright/followers","following_url":"https://api.github.com/users/henrywright/following{/other_user}","gists_url":"https://api.github.com/users/henrywright/gists{/gist_id}","starred_url":"https://api.github.com/users/henrywright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henrywright/subscriptions","organizations_url":"https://api.github.com/users/henrywright/orgs","repos_url":"https://api.github.com/users/henrywright/repos","events_url":"https://api.github.com/users/henrywright/events{/privacy}","received_events_url":"https://api.github.com/users/henrywright/received_events","type":"User","site_admin":false},"created_at":"2015-04-03T11:59:53Z","updated_at":"2015-04-03T11:59:53Z","body":"I've introduced the js we discussed. When the hidden privacy option is clicked, the restriction checkbox disappears from screen. When the public or private options are clicked, the checkbox reappears.\r\n\r\nI've also made things context sensitive with regards to restricting a group. \r\n\r\nA few things need to be done from my end:\r\n\r\n1. Test\r\n2. Clean up\r\n3. Regenerate the .pot\r\n\r\nAt your end, please feel free to test by adding some member type data to some dummy users in your site. Also, we need to consider the performance aspects we spoke about to see if going ahead with group loop filtering would be a good idea (or not)."}}