You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2019/10/16 07:09:44 UTC

[GitHub] [fineract] ivan333m commented on a change in pull request #642: FINERACT-724 Upgrade Spring Boot, Spring and Spring Security to their latest stable version

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:
users@infra.apache.org


With regards,
Apache Git Services