File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
sfdx-source/apex-common/test/classes Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -80,16 +80,16 @@ private class fflib_SecurityUtilsTest {
8080
8181 static User setupTestUser (String profileName ){
8282 Profile p ;
83- Boolean usedMinimumAccessProfile = false ;
83+ Boolean applyReadOnlyPermissionSet = false ;
8484 if (profileName == ' Read Only' ) {
85+ applyReadOnlyPermissionSet = true ;
8586 try {
8687 p = getProfile (profileName );
8788 } catch (QueryException ex ) {
8889 if (ex .getMessage ().contains (' List has no rows for assignment to SObject' )) {
8990 // #315 If the "Read Only" Profile is absent, then assume it's a Spring '21 org and see if there's a
9091 // "Minimum Access - Salesforce" Profile we can use instead.
9192 p = getProfile (' Minimum Access - Salesforce' );
92- usedMinimumAccessProfile = true ;
9393 }
9494 }
9595 } else {
@@ -117,7 +117,7 @@ private class fflib_SecurityUtilsTest {
117117 );
118118 insert usr ;
119119
120- if (usedMinimumAccessProfile ) {
120+ if (applyReadOnlyPermissionSet ) {
121121 // #315 We need to assign the Perm Set to grant Account "Read" access
122122 PermissionSet accountReadPS = [SELECT Id FROM PermissionSet WHERE Name = ' ReadOnlyPermissionSet' ];
123123 PermissionSetAssignment psa = new PermissionSetAssignment (AssigneeId = usr .Id , PermissionSetId = accountReadPS .Id );
You can’t perform that action at this time.
0 commit comments