Package org.springframework.security.access.expression

Examples of org.springframework.security.access.expression.SecurityExpressionHandler


    public void grantsAccessIfExpressionIsTrueDeniesIfFalse() {
        WebExpressionVoter voter = new WebExpressionVoter();
        Expression ex = mock(Expression.class);
        WebExpressionConfigAttribute weca = new WebExpressionConfigAttribute(ex);
        EvaluationContext ctx = mock(EvaluationContext.class);
        SecurityExpressionHandler eh = mock(SecurityExpressionHandler.class);
        FilterInvocation fi = new FilterInvocation("/path", "GET");
        voter.setExpressionHandler(eh);
        when(eh.createEvaluationContext(user, fi)).thenReturn(ctx);
        when(ex.getValue(ctx, Boolean.class)).thenReturn(Boolean.TRUE).thenReturn(Boolean.FALSE);
        ArrayList attributes = new ArrayList();
        attributes.addAll(SecurityConfig.createList("A","B","C"));
        attributes.add(weca);
View Full Code Here

TOP

Related Classes of org.springframework.security.access.expression.SecurityExpressionHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.