Created
November 11, 2014 21:30
-
-
Save tyoshikawa1106/720da7dd30ad4e88eda1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
private class PermissionSetAssignmentControllerTest { | |
static testMethod void PermissionSetAssignmentControllerTest() { | |
Test.startTest(); | |
PermissionSetAssignmentController cls = new PermissionSetAssignmentController(); | |
System.assertEquals(cls.permissionSetAssignments.isEmpty(), false); | |
Test.stopTest(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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