代码语言:javascript复制
// 查询可操作用户名单
Set<String> userNameSet = new Set<String>();
for (PermissionSetAssignment psa : [SELECT Assignee.Name,Assignee.username, PermissionSet.Id,
PermissionSet.Profile.Name,
PermissionSet.isOwnedByProfile,
PermissionSet.Label
FROM PermissionSetAssignment
WHERE PermissionSet.Name= 'OnlineCsPermset'])
{
userNameSet.add(psa.Assignee.username);
}