Limiting Access To Connection Feature (CBSubs)

2 years 10 months ago #325072 by AlexRag
Use Case
  • 2 Plans (1 x Free, 1 Paid)
  • "Free Plan" is not to have access to Connections, Activity Feeds and Groups, nor see Paid Members" Profiles (Except name, profile and canvas image)

Restrict Access to Connection Feature
Since learning that the Connection Feature is not controllable with Joomla’s ACL. I've taken some steps to control access by:
1. Made the Connection tab only visible to Paid User groups (Set access level to “Paid Member” user-group
2. Hidden the Connection menu link on the profile (top menu) using Auto Actions
-Type: Code
-Condition: Usergroups > Free Plan
-Action: CSS (inline):
cbMenu_UE_MENU_CONNECTIONS {
    display: none !important;
}
3. Made the CB Manage Connection Menu link visible to “Paid Member” user-group

QUESTIONS:
a. Is there any possible issues with setting the Manage Connections menu to a specific user-group rather than public or registered?

b. A concern surfaced in that a paid member can still find the free member in Kunena simply by clicking on their avatar image which directs them to the free members profile page. The paid member can then easily Request Connection Menu on the Free Plan Profile Page). This will permit the Paid Member to request a connection with a Free Member and if even they get a request and even accept it (via the notification pop up) they can’t do anything with it since they cannot access the Connection Tab or Manafe Connection area.

How can I prevent Free Members from getting these Connection Request Notifications? I’m also okay with the disabling the Notification feature altogether for the Free Plan altogether if it's easier.

c. Can any of this be taken care of by Auto Actions. The “onBeforeAddConnectionRequest” was suggested in an earlier post but was unsure what type to look at. I think I would be looking at the usergroup type possibly? I am also wondering if there are other actions to look at.

Restricting Access to Activity Feeds
1. I've simply restricting the view access of the activity feed in a profile to the Paid Member user-group. I think I can also look at using CB Tabs Protection or CB Conditionals for this.

Restricting Access to Groups (tab)
1. Same thing here - I've simply restricting the view access to the Paid Member user-group.

Thanks.

Please Log in to join the conversation.

2 years 10 months ago - 2 years 10 months ago #325075 by AlexRag

The paid member can then easily Request Connection Menu on the Free Plan Profile Page.

So far, I figured out how to hide the Request Connection and Send Private Message Menu when a Paid Member views a Free Member's Profile using the same CSS trick recommended earlier.

Auto Actions to the rescue again!

Trigger: onAfterUserProfile Display
Condition 1: Usergroup / Viewing User / Has / "Paid Member" usergroup AND
Condition 2: Usergroup / Action User / Has / "Free Member" usergroup
Action: CSS (inline)
Code:
cbMenu_UE_MENU_MESSAGES{    
   display: none !important;
}

.cbMenu_UE_MENU_CONNECTIONS {
    display: none !important;
}

Attachments:

Please Log in to join the conversation.

2 years 10 months ago #325082 by krileon
There isn't really a simple way to limit the connections feature at this time. It's meant to be off or on. During the CB 3.x rewrite this will be 100% redesigned and will have support for that though. The easiest way for now is to just block access to its various pages using as much Joomla ACL as you can on its menu items then using CBSubs Content and its By URL Part protection to block access based off subscription.

The onBeforeAddConnectionRequest trigger can be combined with a Redirect action as well to cancel the connection request if you wanted if you didn't want to use the By URL Part protection in CBSubs to block access.

So far, I figured out how to hide the Request Connection and Send Private Message Menu when a Paid Member views a Free Member's Profile using the same CSS trick recommended earlier.

That will hide it, but won't protect the endpoints for requesting connections. Be sure you also use the By URL Part protection in your plans provided by CBSubs Content under Integrations > Extensions to protect the connection request URL. Specifically the below.

option=com_comprofiler&view=addconnection


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

2 years 10 months ago #325087 by AlexRag
There's never a shortage of options!

The onBeforeAddConnectionRequest trigger can be combined with a Redirect action as well to cancel the connection request if you wanted if you didn't want to use the By URL Part protection in CBSubs to block access.

This might be more elegant than seeing a "Error" You do not have permission to see this resource", but the URL Part protection is an easier one to keep track of if I add more plans down the road.

That will hide it, but won't protect the endpoints for requesting connections. Be sure you also use the By URL Part protection in your plans provided by CBSubs Content under Integrations > Extensions to protect the connection request URL. Specifically the below.
option=com_comprofiler&view=addconnection

Is this what it should looks like?


To summarize:
1. Hide Profile menu links with CSS
2. Set up URL Part Protection (as above)
3. Protected the Connections tab and Manage Connections menu link via Joomla's ACL.

Is there anything else I may be missing?


For Private Messaging and Activity Feed, I gather its a similar strategy, since those to are either on or off?
Attachments:

Please Log in to join the conversation.

2 years 10 months ago #325098 by krileon

Is this what it should looks like?

Yup.

Is there anything else I may be missing?

Nope, that should cover it.

For Private Messaging and Activity Feed, I gather its a similar strategy, since those to are either on or off?

Private Messaging and CB Activity have Create access permissions you can configure. Within Private Message System > Internal > Create adjust "User Messages From Access" to limit who can send messages. This should be set to a view access level that contains all the usergroups you want to have messaging permissions. Next do the same in CB Activity > Activity > Create for the "Create Access" parameter. If you don't want them to see streams at all just adjust the ACL of the Activity tab itself in CB > Tab Management. These features have more than off/on behavior so it's quite a bit easier adjusting them.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

2 years 10 months ago #325161 by AlexRag
Sweet! That should just about cover what I wanted to accomplish! Awesome!

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.226 seconds

Facebook Twitter LinkedIn