Search in sources :

Example 6 with CustomUserPredicate

use of uk.gov.gchq.gaffer.access.predicate.user.CustomUserPredicate in project Gaffer by gchq.

the class NamedOperationDetailTest method shouldConfigureCustomReadAccessPredicateWhenSpecified.

@Test
public void shouldConfigureCustomReadAccessPredicateWhenSpecified() {
    final AccessPredicate customAccessPredicate = new AccessPredicate(new CustomUserPredicate());
    final NamedOperationDetail namedOperationDetail = getBaseNamedOperationDetailBuilder().readAccessPredicate(customAccessPredicate).build();
    assertEquals(customAccessPredicate, namedOperationDetail.getReadAccessPredicate());
}
Also used : CustomUserPredicate(uk.gov.gchq.gaffer.access.predicate.user.CustomUserPredicate) AccessPredicate(uk.gov.gchq.gaffer.access.predicate.AccessPredicate) Test(org.junit.jupiter.api.Test)

Example 7 with CustomUserPredicate

use of uk.gov.gchq.gaffer.access.predicate.user.CustomUserPredicate in project Gaffer by gchq.

the class NamedOperationDetailTest method shouldConfigureCustomWriteAccessPredicateWhenSpecified.

@Test
public void shouldConfigureCustomWriteAccessPredicateWhenSpecified() {
    final AccessPredicate customAccessPredicate = new AccessPredicate(new CustomUserPredicate());
    final NamedOperationDetail namedOperationDetail = getBaseNamedOperationDetailBuilder().writeAccessPredicate(customAccessPredicate).build();
    assertEquals(customAccessPredicate, namedOperationDetail.getWriteAccessPredicate());
}
Also used : CustomUserPredicate(uk.gov.gchq.gaffer.access.predicate.user.CustomUserPredicate) AccessPredicate(uk.gov.gchq.gaffer.access.predicate.AccessPredicate) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)7 AccessPredicate (uk.gov.gchq.gaffer.access.predicate.AccessPredicate)7 CustomUserPredicate (uk.gov.gchq.gaffer.access.predicate.user.CustomUserPredicate)7 NoAccessPredicate (uk.gov.gchq.gaffer.access.predicate.NoAccessPredicate)1 UnrestrictedAccessPredicate (uk.gov.gchq.gaffer.access.predicate.UnrestrictedAccessPredicate)1 NamedViewDetail (uk.gov.gchq.gaffer.data.elementdefinition.view.NamedViewDetail)1 NamedViewWriteAccessPredicate (uk.gov.gchq.gaffer.data.elementdefinition.view.access.predicate.NamedViewWriteAccessPredicate)1 FederatedGraphReadAccessPredicate (uk.gov.gchq.gaffer.federatedstore.access.predicate.FederatedGraphReadAccessPredicate)1 FederatedGraphWriteAccessPredicate (uk.gov.gchq.gaffer.federatedstore.access.predicate.FederatedGraphWriteAccessPredicate)1 NamedOperationDetail (uk.gov.gchq.gaffer.named.operation.NamedOperationDetail)1 OperationChain (uk.gov.gchq.gaffer.operation.OperationChain)1 AddElements (uk.gov.gchq.gaffer.operation.impl.add.AddElements)1 User (uk.gov.gchq.gaffer.user.User)1