Skip to main content

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__c
  • flair__Comment_Mentioned_Employee__c
  • flair__Comment_Reaction__c
  • flair__Employee_Avatar__c
  • flair__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

Ensure users have access to all Apex classes with "Comment" in the name. This typically includes classes like:

  • CommentController
  • CommentService
  • CommentTriggerHandler

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:

  • EmployeeAvatarCommon
  • EmployeeAvatarCriteria
  • EmployeeAvatarGroupController
  • EmployeeAvatarResizer
  • EmployeeAvatarResizerAsync
  • EmployeeAvatarRestController
  • EmployeeAvatarService
  • EmployeeAvatarsFactory
  • EmployeeAvatarUpdateController

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:
    1. Search for and select the object (e.g., flair__Comment__c)
    2. Click Edit
    3. Under Object Permissions, enable Read (and Create, Edit, Delete if users should be able to modify comments)
    4. Under Field Permissions, ensure that the flair__Employee__c field is accessible
    5. Click Save
  • 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:

  1. Verify that the user has access to all five required objects
  2. Check that the flair__Employee__c field is accessible on all five objects
  3. Confirm that all Employee Avatar Apex classes are included in the permission set
  4. 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.