To control what components constituents can view and interact with in Community Hub, you can grant or revoke user access to menu items, pages, cards, and buttons based on criteria you define.
You make components accessible to users by creating access controls which determine who can access what component based on criteria defined using:
- A true or false field on the Account object.
- A business rule record. Learn more about Business Rules.
- An assigned or not assigned permission set. Learn more about permission sets (external).
- A SOQL query record. Learn more about SOQL Queries.
- Custom criteria defined with development effort.
You can use access controls to grant access when criteria is met, or when it is not met; it is all up to how you set it up.
As an example, say you have a custom card in Community Hub which displays member-only news and announcements. To ensure only members can view and interact with this card, you could create a "MembersOnly" access control which evaluates whether the
Member on the Account is selected, meaning the user is in fact a member. Adding this access control to the card ensures only member users can access it.
Best Practices When Using Access Controls
As you use access controls, it's important to keep in mind that evaluating the criteria you define takes time, and can lead to a poor user experience if not done with a few considerations. Access controls involving permission sets, or those using a field on the Account object will have little effect on the the user experience, as the effort to evaluate this type of criteria is small. In contrast, access controls that use a SOQL query record can take much more effort to evaluate, and can have a negative impact page load time and performance.
Here are a few tips for using access controls in Community Hub:
- As with everything, test first in your staging org. Test out the experience without the access control, and then enable the access control to see how that impacts the amount of time it take for the component to load. This will give you a good idea of what your constituents will experience.
- When working with an access control that uses a SOQL query record, ensure you maximize the performance of the SOQL query (external).
Customize Access Controls
Administrators use Access Control Configuration to customize access controls. Administrators can:
- View access controls
- Create an access control
- Edit an access control
While editing an access control, administrators can customize the:
- Name of the access control
- Type of criteria to evaluate
- Status of the access control