Skip to content

Commit 991b7d4

Browse files
pocj8ur4inrwinch
authored andcommitted
Rollback setDefaultRolePrefix() call
- preserve setDefaultRolePrefix() in getRootObject() Signed-off-by: pocj8ur4in <pocj8ur4in@gmail.com>
1 parent 64e863e commit 991b7d4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

data/src/main/java/org/springframework/security/data/repository/query/SecurityEvaluationContextExtension.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ public SecurityExpressionRoot<Object> getRootObject() {
134134
};
135135
root.setAuthorizationManagerFactory(this.authorizationManagerFactory);
136136
root.setPermissionEvaluator(this.permissionEvaluator);
137+
if (!DEFAULT_ROLE_PREFIX.equals(this.defaultRolePrefix)) {
138+
// Ensure SecurityExpressionRoot can strip the custom role prefix
139+
root.setDefaultRolePrefix(this.defaultRolePrefix);
140+
}
137141
return root;
138142
}
139143

0 commit comments

Comments
 (0)