Search in sources :

Example 1 with PermissionExpressionNormalizationVisitor

use of com.yahoo.elide.core.security.visitors.PermissionExpressionNormalizationVisitor in project elide by yahoo.

the class PermissionExpressionNormalizationVisitorTest method setUp.

@BeforeAll
public void setUp() {
    EntityDictionary dictionary = TestDictionary.getTestDictionary();
    ElideSettings elideSettings = new ElideSettingsBuilder(null).withEntityDictionary(dictionary).build();
    RequestScope requestScope = new RequestScope(null, null, NO_VERSION, null, null, null, null, null, UUID.randomUUID(), elideSettings);
    permissionExpressionVisitor = new PermissionExpressionVisitor(dictionary, (check -> new CheckExpression(check, null, requestScope, null, null)));
    normalizationVisitor = new PermissionExpressionNormalizationVisitor();
}
Also used : ElideSettingsBuilder(com.yahoo.elide.ElideSettingsBuilder) PermissionExpressionVisitor(com.yahoo.elide.core.security.visitors.PermissionExpressionVisitor) ElideSettings(com.yahoo.elide.ElideSettings) EntityDictionary(com.yahoo.elide.core.dictionary.EntityDictionary) RequestScope(com.yahoo.elide.core.RequestScope) PermissionExpressionNormalizationVisitor(com.yahoo.elide.core.security.visitors.PermissionExpressionNormalizationVisitor) CheckExpression(com.yahoo.elide.core.security.permissions.expressions.CheckExpression) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

ElideSettings (com.yahoo.elide.ElideSettings)1 ElideSettingsBuilder (com.yahoo.elide.ElideSettingsBuilder)1 RequestScope (com.yahoo.elide.core.RequestScope)1 EntityDictionary (com.yahoo.elide.core.dictionary.EntityDictionary)1 CheckExpression (com.yahoo.elide.core.security.permissions.expressions.CheckExpression)1 PermissionExpressionNormalizationVisitor (com.yahoo.elide.core.security.visitors.PermissionExpressionNormalizationVisitor)1 PermissionExpressionVisitor (com.yahoo.elide.core.security.visitors.PermissionExpressionVisitor)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1