I have the "Profile-Based Rollout of Chatter" feature enable in my org. Per this page users with certain permissions will automatically have Chatter enabled.
Naturally, I'd like to verify that the users who I do not want to have access to Chatter don't have access. I was thinking I could do some querying of the PermissionSet
and PermissionSetAssignment
objects, and came up with a query like:
select Assignee.name, Id, PermissionSet.name, SystemModstamp from PermissionSetAssignment where assignee.isactive = true and (permissionset.permissionsChatterOwnGroups = true OR permissionset.permissionsChatterFileLink = true or permissionset.permissionsChatterInviteExternalUsers = true or permissionset.permissionsManageChatterMessages = true or permissionset.permissionsModerateChatter = true or permissionset.permissionsViewAllData = true or permissionset.permissionsChatterEnabledforUser = true) order by permissionset.name, Assignee.name
However, I don't know if this query is thorough enough ensure I'm seeing all of the users who can currently access Chatter. So, how can I hunt down all users who have access to Chatter and determine why?