Search in sources :

Example 1 with AuditLogger

use of com.yahoo.elide.core.audit.AuditLogger in project elide by yahoo.

the class PermissionAnnotationTest method setup.

@BeforeAll
public static void setup() {
    dictionary.bindEntity(FunWithPermissions.class);
    FunWithPermissions fun = new FunWithPermissions();
    fun.setId(1);
    AuditLogger testLogger = new TestAuditLogger();
    ElideSettings elideSettings = new ElideSettingsBuilder(null).withDefaultPageSize(10).withDefaultMaxPageSize(10).withAuditLogger(testLogger).withEntityDictionary(dictionary).build();
    RequestScope goodScope = new RequestScope(null, null, NO_VERSION, null, null, GOOD_USER, null, null, UUID.randomUUID(), elideSettings);
    funRecord = new PersistentResource<>(fun, goodScope.getUUIDFor(fun), goodScope);
    RequestScope badScope = new RequestScope(null, null, NO_VERSION, null, null, BAD_USER, null, null, UUID.randomUUID(), elideSettings);
    badRecord = new PersistentResource<>(fun, badScope.getUUIDFor(fun), badScope);
}
Also used : ElideSettingsBuilder(com.yahoo.elide.ElideSettingsBuilder) AuditLogger(com.yahoo.elide.core.audit.AuditLogger) TestAuditLogger(com.yahoo.elide.core.audit.TestAuditLogger) ElideSettings(com.yahoo.elide.ElideSettings) TestAuditLogger(com.yahoo.elide.core.audit.TestAuditLogger) FunWithPermissions(example.FunWithPermissions) RequestScope(com.yahoo.elide.core.RequestScope) 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 AuditLogger (com.yahoo.elide.core.audit.AuditLogger)1 TestAuditLogger (com.yahoo.elide.core.audit.TestAuditLogger)1 FunWithPermissions (example.FunWithPermissions)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1