November 2017
Intermediate to advanced
542 pages
14h 24m
English
We can then leverage the CustomAuthorizationConfig.java configuration that is provided with this chapter to provide an ExpressionHandler that uses our CalendarPermissionEvaluator, like so:
//src/main/java/com/packtpub/springsecurity/configuration/ CustomAuthorizationConfig.java@Beanpublic DefaultMethodSecurityExpressionHandler defaultExpressionHandler(EventDao eventDao){ DefaultMethodSecurityExpressionHandler deh = new DefaultMethodSecurityExpressionHandler(); deh.setPermissionEvaluator( new CalendarPermissionEvaluator(eventDao)); return deh;}
The configuration should look similar to the configuration from Chapter 12, Access Control Lists, except that we now use our CalendarPermissionEvalulator class ...
Read now
Unlock full access