I have two questions:
How to get all Permission Sets' Name/Label?
How to know the Security setting in a name-knowed Permission Set?
For audit reason, I have to retrieve Object/Field read/edit Security, programatically.
Regular Security Setting/Profile, could be retrieve via sqol as:
SELECT ID, SObjectType, ParentId, PermissionsCreate , PermissionsEdit, PermissionsDelete From ObjectPermissions where SObjectType = 'Account' AND ParentId IN ( Select id FROM PermissionSet WHERE PermissionSet.Profile.Name = 'System Administrator' )
And I've learned Permission sets are related to an user via PermissionSetAssignment.
SELECT PermissionSet.Name, Assignee.Id, Assignee.Name, Assignee.ProfileId FROM PermissionSetAssignment ORDER BY PermissionSet.Name
But I don't know how to combined these soql to get security setting in a permission set.