assertEquals( 5, allowedActions.size() );
}
@Test
public void testRoleAuthorizationPolicyTenants() throws Exception {
ITenant tenantAcme = null;
List<String> origLogicalRoles = null;
try {
loginAsSysTenantAdmin();
origLogicalRoles =
roleBindingDao.getBoundLogicalRoleNames( Arrays.asList( "acme_Authenticated" ) );
tenantAcme =
tenantManager.createTenant( systemTenant, TENANT_ID_ACME, tenantAdminRoleName, tenantAuthenticatedRoleName,
ANONYMOUS_ROLE_NAME );
userRoleDao.createUser( tenantAcme, USERNAME_ADMIN, PASSWORD, "", new String[] { tenantAdminRoleName } );
ITenant tenantDuff =
tenantManager.createTenant( systemTenant, TENANT_ID_DUFF, tenantAdminRoleName, tenantAuthenticatedRoleName,
ANONYMOUS_ROLE_NAME );
userRoleDao.createUser( tenantDuff, USERNAME_ADMIN, PASSWORD, "", new String[] { tenantAdminRoleName } );
login( USERNAME_ADMIN, tenantAcme, new String[] { tenantAdminRoleName, tenantAuthenticatedRoleName } );