Custom Permission for Comments Feature
If you are using custom permission sets instead of the standard flair permission sets, you need to ensure that users have access to all required objects, fields, and Apex classes for the Comments feature to work correctly.
Overview
The Comments Tab component requires access to multiple Salesforce objects, specific fields, and Apex classes. If users can see Comment records but the Comments Tab component displays a loading spinner indefinitely, this is typically a permission issue.
Required Objects
Users must have Read access to the following objects:
flair__Comment__cflair__Comment_Mentioned_Employee__cflair__Comment_Reaction__cflair__Employee_Avatar__cflair__Reaction__c
Required Field Access
On all of the above objects, users must also have access to the following field:
flair__Employee__c
Required Apex Classes
Comment-Related Apex Classes
Ensure users have access to all Apex classes with "Comment" in the name. This typically includes classes like:
CommentControllerCommentServiceCommentTriggerHandler
And other Comment-related classes in your org.
Employee Avatar Apex Classes
In addition to Comment-related classes, users also need access to Employee Avatar functionality:
EmployeeAvatarCommonEmployeeAvatarCriteriaEmployeeAvatarGroupControllerEmployeeAvatarResizerEmployeeAvatarResizerAsyncEmployeeAvatarRestControllerEmployeeAvatarServiceEmployeeAvatarsFactoryEmployeeAvatarUpdateController
Creating a Custom Permission Set
Follow these steps to create a custom permission set for the Comments feature:
Step 1: Create the Permission Set
- Open Salesforce Setup and search for Permission Sets in the Quick Find bar.
- Click New to create a new permission set.
- In the Label field, give your permission set a name, e.g., "Flair Comments Access".
- Leave the API Name field as it is, and click Save.
📘 If you already have a custom permission set for your users, you can skip this step and add the permissions to your existing permission set.
Step 2: Add Object Permissions
- In your permission set, click on Object Settings.
- For each of the required objects listed above, do the following:
- Search for and select the object (e.g.,
flair__Comment__c) - Click Edit
- Under Object Permissions, enable Read (and Create, Edit, Delete if users should be able to modify comments)
- Under Field Permissions, ensure that the
flair__Employee__cfield is accessible - Click Save
- Search for and select the object (e.g.,
- Repeat this process for all five required objects.
Step 3: Add Apex Class Permissions
- In your permission set, click on Apex Class Access under the Apps section.
- Click Edit.
- From the Available Apex Classes list, select all Comment-related classes and all Employee Avatar classes listed above.
- Click Add to move them to the Enabled Apex Classes list.
- Click Save.
Step 4: Assign the Permission Set to Users
- Use the search bar at the top of the Salesforce Setup screen to find the user who needs access.
- Navigate to Permission Set Assignments.
- Click Edit Assignments.
- Select your new permission set from the Available Permission Sets list and click Add.
- Click Save.
Troubleshooting
Comments Tab Shows Infinite Loading
If the Comments Tab component displays a loading spinner indefinitely:
- Verify that the user has access to all five required objects
- Check that the
flair__Employee__cfield is accessible on all five objects - Confirm that all Employee Avatar Apex classes are included in the permission set
- Review any Developer Console errors for specific permission issues
Users Have Record Access But Cannot See Comments in Component
This typically indicates missing Apex class permissions, particularly the Employee Avatar classes. Review the list of required Apex classes and ensure all are included in the permission set.
Using Standard flair Permission Sets
If you prefer to use flair's standard permission sets instead of creating custom ones, note that HR Admins typically have full access to Comments through the standard Flair Manager permission set. These permission sets are automatically updated when new features are added.
⚠️ We recommend using flair's standard permission sets or permission set groups when possible, as they are maintained and updated automatically with each release.