use of ddf.security.permission.CollectionPermission in project ddf by codice.
the class WorkspacePolicyExtensionTest method testShouldRemoveRolesAndEmailsWhenEmailImplied.
@Test
public void testShouldRemoveRolesAndEmailsWhenEmailImplied() {
List<Permission> before = ImmutableList.of(RANDOM, ROLES, EMAILS);
doReturn(before).when(match).getPermissionList();
CollectionPermission subject = subjectFrom(makePermission(Constants.EMAIL_ADDRESS_CLAIM_URI, VALUES));
List<Permission> after = extension.isPermittedMatchAll(subject, match).getPermissionList();
assertThat(after, is(ImmutableList.of(RANDOM)));
}
Aggregations