Java Code Examples for org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler#setPermissionEvaluator()

The following examples show how to use org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler#setPermissionEvaluator() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AclConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@Bean
public DefaultMethodSecurityExpressionHandler expressionHandler(){
    DefaultMethodSecurityExpressionHandler dmseh = new DefaultMethodSecurityExpressionHandler();

    dmseh.setPermissionEvaluator(permissionEvaluator());
    dmseh.setPermissionCacheOptimizer(permissionCacheOptimizer());
    return dmseh;
}
 
Example 2
Source File: AclConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@Bean
public DefaultMethodSecurityExpressionHandler expressionHandler(){
    DefaultMethodSecurityExpressionHandler dmseh = new DefaultMethodSecurityExpressionHandler();

    dmseh.setPermissionEvaluator(permissionEvaluator());
    dmseh.setPermissionCacheOptimizer(permissionCacheOptimizer());
    return dmseh;
}
 
Example 3
Source File: AclConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@Bean
public DefaultMethodSecurityExpressionHandler expressionHandler(){
    DefaultMethodSecurityExpressionHandler dmseh = new DefaultMethodSecurityExpressionHandler();

    dmseh.setPermissionEvaluator(permissionEvaluator());
    dmseh.setPermissionCacheOptimizer(permissionCacheOptimizer());
    return dmseh;
}
 
Example 4
Source File: AclConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@Bean
public DefaultMethodSecurityExpressionHandler expressionHandler(){
    DefaultMethodSecurityExpressionHandler dmseh = new DefaultMethodSecurityExpressionHandler();

    dmseh.setPermissionEvaluator(permissionEvaluator());
    dmseh.setPermissionCacheOptimizer(permissionCacheOptimizer());
    return dmseh;
}
 
Example 5
Source File: AclConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@Bean
public DefaultMethodSecurityExpressionHandler expressionHandler(){
    DefaultMethodSecurityExpressionHandler dmseh = new DefaultMethodSecurityExpressionHandler();

    dmseh.setPermissionEvaluator(permissionEvaluator());
    dmseh.setPermissionCacheOptimizer(permissionCacheOptimizer());
    return dmseh;
}
 
Example 6
Source File: CustomAuthorizationConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@Description("DefaultMethodSecurityExpressionHandler")
@Bean
public DefaultMethodSecurityExpressionHandler defaultExpressionHandler(EventDao eventDao){
    DefaultMethodSecurityExpressionHandler deh = new DefaultMethodSecurityExpressionHandler();
    deh.setPermissionEvaluator(
            new CalendarPermissionEvaluator(eventDao));
    return deh;
}
 
Example 7
Source File: CustomAuthorizationConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@Description("DefaultMethodSecurityExpressionHandler")
@Bean
public DefaultMethodSecurityExpressionHandler defaultExpressionHandler(EventDao eventDao){
    DefaultMethodSecurityExpressionHandler deh = new DefaultMethodSecurityExpressionHandler();
    deh.setPermissionEvaluator(
            new CalendarPermissionEvaluator(eventDao));
    return deh;
}
 
Example 8
Source File: CustomAuthorizationConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@Description("DefaultMethodSecurityExpressionHandler")
@Bean
public DefaultMethodSecurityExpressionHandler defaultExpressionHandler(EventDao eventDao){
    DefaultMethodSecurityExpressionHandler deh = new DefaultMethodSecurityExpressionHandler();
    deh.setPermissionEvaluator(
            new CalendarPermissionEvaluator(eventDao));
    return deh;
}
 
Example 9
Source File: PlatformGlobalMethodSecurityConfiguration.java    From abixen-platform with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    DefaultMethodSecurityExpressionHandler expressionHandler =
            new DefaultMethodSecurityExpressionHandler();
    expressionHandler.setPermissionEvaluator(platformPermissionEvaluator);
    return expressionHandler;
}
 
Example 10
Source File: ACLContext.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public MethodSecurityExpressionHandler defaultMethodSecurityExpressionHandler() {
    DefaultMethodSecurityExpressionHandler expressionHandler = new DefaultMethodSecurityExpressionHandler();
    AclPermissionEvaluator permissionEvaluator = new AclPermissionEvaluator(aclService());
    expressionHandler.setPermissionEvaluator(permissionEvaluator);
    expressionHandler.setPermissionCacheOptimizer(new AclPermissionCacheOptimizer(aclService()));
    return expressionHandler;
}
 
Example 11
Source File: MethodSecurityConfig.java    From AbacSpringSecurity with MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
	DefaultMethodSecurityExpressionHandler result = new DefaultMethodSecurityExpressionHandler();
	result.setPermissionEvaluator(permissionEvaluator);
	return result;
}
 
Example 12
Source File: SecurityConfig.java    From cloudbreak with Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    DefaultMethodSecurityExpressionHandler expressionHandler = new DefaultMethodSecurityExpressionHandler();
    expressionHandler.setPermissionEvaluator(tenantBasedPermissionEvaluator);
    return expressionHandler;
}
 
Example 13
Source File: SecurityConfig.java    From cloudbreak with Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    DefaultMethodSecurityExpressionHandler expressionHandler = new DefaultMethodSecurityExpressionHandler();
    expressionHandler.setPermissionEvaluator(tenantBasedPermissionEvaluator);
    return expressionHandler;
}