Skip to content

Instantly share code, notes, and snippets.

@tyoshikawa1106
Created November 11, 2014 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyoshikawa1106/720da7dd30ad4e88eda1 to your computer and use it in GitHub Desktop.
Save tyoshikawa1106/720da7dd30ad4e88eda1 to your computer and use it in GitHub Desktop.
public with sharing class PermissionSetAssignmentController {
public List<PermissionSetAssignment> permissionSetAssignments {get; set;}
public PermissionSetAssignmentController() {
this.permissionSetAssignments = [
SELECT
Id
,AssigneeId
,Assignee.Name
,PermissionSetId
,PermissionSet.Name
FROM
PermissionSetAssignment
ORDER BY Id ASC
LIMIT 1000
];
}
}
@isTest
private class PermissionSetAssignmentControllerTest {
static testMethod void PermissionSetAssignmentControllerTest() {
Test.startTest();
PermissionSetAssignmentController cls = new PermissionSetAssignmentController();
System.assertEquals(cls.permissionSetAssignments.isEmpty(), false);
Test.stopTest();
}
}
<apex:page controller="PermissionSetAssignmentController" showHeader="true" sidebar="false">
<div id="vf-page">
<apex:form id="form">
<apex:pageBlock title="{!$ObjectType.PermissionSetAssignment.Label}" id="block">
<apex:pageBlockTable value="{!permissionSetAssignments}" var="item">
<apex:column headerValue="{!$ObjectType.PermissionSetAssignment.Fields.Id.Label}">
<apex:outputText value="{!item.Id}" />
</apex:column>
<apex:column headerValue="{!$ObjectType.PermissionSetAssignment.Fields.AssigneeId.Label}">
<apex:outputText value="{!item.AssigneeId}" />
<br/>
<apex:outputText value="{!item.Assignee.Name}" />
</apex:column>
<apex:column headerValue="{!$ObjectType.PermissionSetAssignment.Fields.PermissionSetId.Label}">
<apex:outputText value="{!item.PermissionSetId}" />
<br/>
<apex:outputText value="{!item.PermissionSet.Name}" />
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</div>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment