ivan333m commented on a change in pull request #642: FINERACT-724 Upgrade 
Spring Boot, Spring and Spring Security to their latest stable version
URL: https://github.com/apache/fineract/pull/642#discussion_r335308375
 
 

 ##########
 File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataService.java
 ##########
 @@ -32,16 +32,16 @@
 
     DatatableData retrieveDatatable(String datatable);
 
-    @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'REGISTER_DATATABLE')")
+    @PreAuthorize(value = "hasAnyAuthority('ALL_FUNCTIONS', 
'REGISTER_DATATABLE')")
 
 Review comment:
   Roles and authorities are similar in Spring. The main difference is that, 
roles have special semantics – starting with Spring Security 4, the ‘ROLE_‘ 
prefix is automatically added (if it's not already there) by any role related 
method.
   
   So hasAuthority(‘ROLE_ADMIN') is similar to hasRole(‘ADMIN') because the 
‘ROLE_‘ prefix gets added automatically.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to