target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@SuppressWarnings("unchecked") @Test public void testBuildEntityEdOrgSingleContextRights() { Set<String> edOrgs = new HashSet<String>(); edOrgs.add("edOrg1"); edOrgs.add("edOrg2"); edOrgs.add("edOrg3"); edOrgs.add("edOrg4"); Entity entity = Mockito.mock(Entity.class); Mockito.when(entity.getType()).thenReturn("student"...
public Collection<GrantedAuthority> buildEntityEdOrgContextRights(final EdOrgContextRightsCache edOrgContextRights, final Entity entity, final SecurityUtil.UserContext context, boolean isRead) { Collection<GrantedAuthority> authorities = new HashSet<GrantedAuthority>(); Set<String> edorgs = edOrgOwnershipArbiter.determ...
EntityEdOrgRightBuilder { public Collection<GrantedAuthority> buildEntityEdOrgContextRights(final EdOrgContextRightsCache edOrgContextRights, final Entity entity, final SecurityUtil.UserContext context, boolean isRead) { Collection<GrantedAuthority> authorities = new HashSet<GrantedAuthority>(); Set<String> edorgs = ed...
EntityEdOrgRightBuilder { public Collection<GrantedAuthority> buildEntityEdOrgContextRights(final EdOrgContextRightsCache edOrgContextRights, final Entity entity, final SecurityUtil.UserContext context, boolean isRead) { Collection<GrantedAuthority> authorities = new HashSet<GrantedAuthority>(); Set<String> edorgs = ed...
EntityEdOrgRightBuilder { public Collection<GrantedAuthority> buildEntityEdOrgContextRights(final EdOrgContextRightsCache edOrgContextRights, final Entity entity, final SecurityUtil.UserContext context, boolean isRead) { Collection<GrantedAuthority> authorities = new HashSet<GrantedAuthority>(); Set<String> edorgs = ed...
EntityEdOrgRightBuilder { public Collection<GrantedAuthority> buildEntityEdOrgContextRights(final EdOrgContextRightsCache edOrgContextRights, final Entity entity, final SecurityUtil.UserContext context, boolean isRead) { Collection<GrantedAuthority> authorities = new HashSet<GrantedAuthority>(); Set<String> edorgs = ed...
@Test public void testFilterFields() { Collection<GrantedAuthority> auths = new HashSet<GrantedAuthority>(); auths.add(Right.READ_GENERAL); Entity student = createStudentEntity(EntityNames.STUDENT, STUDENT_ID); EntityBody sb = new EntityBody(student.getBody()); entityRightsFilter.filterFields(sb, auths, "", EntityNames...
@SuppressWarnings("unchecked") protected void filterFields(EntityBody entityBody, Collection<GrantedAuthority> auths, String prefix, String entityType) { if (!auths.contains(Right.FULL_ACCESS)) { List<String> toRemove = new LinkedList<String>(); for (Iterator<Map.Entry<String, Object>> it = entityBody.entrySet().iterat...
EntityRightsFilter { @SuppressWarnings("unchecked") protected void filterFields(EntityBody entityBody, Collection<GrantedAuthority> auths, String prefix, String entityType) { if (!auths.contains(Right.FULL_ACCESS)) { List<String> toRemove = new LinkedList<String>(); for (Iterator<Map.Entry<String, Object>> it = entityB...
EntityRightsFilter { @SuppressWarnings("unchecked") protected void filterFields(EntityBody entityBody, Collection<GrantedAuthority> auths, String prefix, String entityType) { if (!auths.contains(Right.FULL_ACCESS)) { List<String> toRemove = new LinkedList<String>(); for (Iterator<Map.Entry<String, Object>> it = entityB...
EntityRightsFilter { @SuppressWarnings("unchecked") protected void filterFields(EntityBody entityBody, Collection<GrantedAuthority> auths, String prefix, String entityType) { if (!auths.contains(Right.FULL_ACCESS)) { List<String> toRemove = new LinkedList<String>(); for (Iterator<Map.Entry<String, Object>> it = entityB...
EntityRightsFilter { @SuppressWarnings("unchecked") protected void filterFields(EntityBody entityBody, Collection<GrantedAuthority> auths, String prefix, String entityType) { if (!auths.contains(Right.FULL_ACCESS)) { List<String> toRemove = new LinkedList<String>(); for (Iterator<Map.Entry<String, Object>> it = entityB...
@Test public void testComplexFilterReadGeneral() { Collection<GrantedAuthority> auths = new HashSet<GrantedAuthority>(); auths.add(Right.READ_GENERAL); Entity staff = createStaffEntity(EntityNames.STAFF, STAFF_ID); EntityBody sb = new EntityBody(staff.getBody()); entityRightsFilter.complexFilter(sb, auths, EntityNames....
protected void complexFilter(EntityBody entityBody, Collection<GrantedAuthority> auths, String entityType) { if (!auths.contains(Right.READ_RESTRICTED) && (entityType.equals(EntityNames.STAFF) || entityType.equals(EntityNames.TEACHER))) { final String work = "Work"; final String telephoneNumberType = "telephoneNumberTy...
EntityRightsFilter { protected void complexFilter(EntityBody entityBody, Collection<GrantedAuthority> auths, String entityType) { if (!auths.contains(Right.READ_RESTRICTED) && (entityType.equals(EntityNames.STAFF) || entityType.equals(EntityNames.TEACHER))) { final String work = "Work"; final String telephoneNumberType...
EntityRightsFilter { protected void complexFilter(EntityBody entityBody, Collection<GrantedAuthority> auths, String entityType) { if (!auths.contains(Right.READ_RESTRICTED) && (entityType.equals(EntityNames.STAFF) || entityType.equals(EntityNames.TEACHER))) { final String work = "Work"; final String telephoneNumberType...
EntityRightsFilter { protected void complexFilter(EntityBody entityBody, Collection<GrantedAuthority> auths, String entityType) { if (!auths.contains(Right.READ_RESTRICTED) && (entityType.equals(EntityNames.STAFF) || entityType.equals(EntityNames.TEACHER))) { final String work = "Work"; final String telephoneNumberType...
EntityRightsFilter { protected void complexFilter(EntityBody entityBody, Collection<GrantedAuthority> auths, String entityType) { if (!auths.contains(Right.READ_RESTRICTED) && (entityType.equals(EntityNames.STAFF) || entityType.equals(EntityNames.TEACHER))) { final String work = "Work"; final String telephoneNumberType...
@Test public void testComplexFilterReadRestrict() { Collection<GrantedAuthority> auths = new HashSet<GrantedAuthority>(); auths.add(Right.READ_RESTRICTED); Entity staff = createStaffEntity(EntityNames.STAFF, STAFF_ID); EntityBody sb = new EntityBody(staff.getBody()); entityRightsFilter.complexFilter(sb, auths, EntityNa...
protected void complexFilter(EntityBody entityBody, Collection<GrantedAuthority> auths, String entityType) { if (!auths.contains(Right.READ_RESTRICTED) && (entityType.equals(EntityNames.STAFF) || entityType.equals(EntityNames.TEACHER))) { final String work = "Work"; final String telephoneNumberType = "telephoneNumberTy...
EntityRightsFilter { protected void complexFilter(EntityBody entityBody, Collection<GrantedAuthority> auths, String entityType) { if (!auths.contains(Right.READ_RESTRICTED) && (entityType.equals(EntityNames.STAFF) || entityType.equals(EntityNames.TEACHER))) { final String work = "Work"; final String telephoneNumberType...
EntityRightsFilter { protected void complexFilter(EntityBody entityBody, Collection<GrantedAuthority> auths, String entityType) { if (!auths.contains(Right.READ_RESTRICTED) && (entityType.equals(EntityNames.STAFF) || entityType.equals(EntityNames.TEACHER))) { final String work = "Work"; final String telephoneNumberType...
EntityRightsFilter { protected void complexFilter(EntityBody entityBody, Collection<GrantedAuthority> auths, String entityType) { if (!auths.contains(Right.READ_RESTRICTED) && (entityType.equals(EntityNames.STAFF) || entityType.equals(EntityNames.TEACHER))) { final String work = "Work"; final String telephoneNumberType...
EntityRightsFilter { protected void complexFilter(EntityBody entityBody, Collection<GrantedAuthority> auths, String entityType) { if (!auths.contains(Right.READ_RESTRICTED) && (entityType.equals(EntityNames.STAFF) || entityType.equals(EntityNames.TEACHER))) { final String work = "Work"; final String telephoneNumberType...
@Test public void testMakeEntityBody() { Treatment treatment1 = Mockito.mock(Treatment.class); Treatment treatment2 = Mockito.mock(Treatment.class); List<Treatment> treatments = new ArrayList<Treatment>(); treatments.add(treatment1); treatments.add(treatment2); Collection<GrantedAuthority> auths = new HashSet<GrantedAu...
public EntityBody makeEntityBody(Entity entity, List<Treatment> treamts, EntityDefinition defn, boolean isSelf, Collection<GrantedAuthority> nonSelfAuths, SecurityUtil.UserContext context) { Collection<GrantedAuthority> selfAuths; if (isSelf) { selfAuths = rightAccessValidator.getContextualAuthorities(isSelf, entity, c...
EntityRightsFilter { public EntityBody makeEntityBody(Entity entity, List<Treatment> treamts, EntityDefinition defn, boolean isSelf, Collection<GrantedAuthority> nonSelfAuths, SecurityUtil.UserContext context) { Collection<GrantedAuthority> selfAuths; if (isSelf) { selfAuths = rightAccessValidator.getContextualAuthorit...
EntityRightsFilter { public EntityBody makeEntityBody(Entity entity, List<Treatment> treamts, EntityDefinition defn, boolean isSelf, Collection<GrantedAuthority> nonSelfAuths, SecurityUtil.UserContext context) { Collection<GrantedAuthority> selfAuths; if (isSelf) { selfAuths = rightAccessValidator.getContextualAuthorit...
EntityRightsFilter { public EntityBody makeEntityBody(Entity entity, List<Treatment> treamts, EntityDefinition defn, boolean isSelf, Collection<GrantedAuthority> nonSelfAuths, SecurityUtil.UserContext context) { Collection<GrantedAuthority> selfAuths; if (isSelf) { selfAuths = rightAccessValidator.getContextualAuthorit...
EntityRightsFilter { public EntityBody makeEntityBody(Entity entity, List<Treatment> treamts, EntityDefinition defn, boolean isSelf, Collection<GrantedAuthority> nonSelfAuths, SecurityUtil.UserContext context) { Collection<GrantedAuthority> selfAuths; if (isSelf) { selfAuths = rightAccessValidator.getContextualAuthorit...
@Test public void testBuildEdOrgContextualRoles () { Set<Entity> seoas = new HashSet<Entity>(); seoas.add(createSEOA("LEA1", "IT Admin")); seoas.add(createSEOA("LEA1", "Educator")); seoas.add(createSEOA("LEA2", "Educator")); seoas.add(createSEOA("LEA2", "Educator")); Set<Role> edOrg1RolesSet = new HashSet<Role>(); edOr...
private Map<String, List<String>> buildEdOrgContextualRoles(Set<Entity> seoas, Set<String> samlRoleSet) { Map<String, List<String>> edOrgRoles = new HashMap<String, List<String>>(); if (seoas != null) { for (Entity seoa : seoas) { String edOrgId = (String) seoa.getBody().get(ParameterConstants.EDUCATION_ORGANIZATION_RE...
EdOrgContextualRoleBuilder { private Map<String, List<String>> buildEdOrgContextualRoles(Set<Entity> seoas, Set<String> samlRoleSet) { Map<String, List<String>> edOrgRoles = new HashMap<String, List<String>>(); if (seoas != null) { for (Entity seoa : seoas) { String edOrgId = (String) seoa.getBody().get(ParameterConsta...
EdOrgContextualRoleBuilder { private Map<String, List<String>> buildEdOrgContextualRoles(Set<Entity> seoas, Set<String> samlRoleSet) { Map<String, List<String>> edOrgRoles = new HashMap<String, List<String>>(); if (seoas != null) { for (Entity seoa : seoas) { String edOrgId = (String) seoa.getBody().get(ParameterConsta...
EdOrgContextualRoleBuilder { private Map<String, List<String>> buildEdOrgContextualRoles(Set<Entity> seoas, Set<String> samlRoleSet) { Map<String, List<String>> edOrgRoles = new HashMap<String, List<String>>(); if (seoas != null) { for (Entity seoa : seoas) { String edOrgId = (String) seoa.getBody().get(ParameterConsta...
EdOrgContextualRoleBuilder { private Map<String, List<String>> buildEdOrgContextualRoles(Set<Entity> seoas, Set<String> samlRoleSet) { Map<String, List<String>> edOrgRoles = new HashMap<String, List<String>>(); if (seoas != null) { for (Entity seoa : seoas) { String edOrgId = (String) seoa.getBody().get(ParameterConsta...
@Test (expected = AccessDeniedException.class) public void testNoCustomRoleMatch () { Set<Entity> seoas = new HashSet<Entity>(); seoas.add(createSEOA("LEA1", "IT Admin")); seoas.add(createSEOA("LEA1", "Educator")); Set<Role> edOrg1RolesSet = new HashSet<Role>(); Mockito.when(resolver.mapRoles(tenant, realmId, Arrays.as...
public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.error("Attempted login by a us...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
@Test (expected = AccessDeniedException.class) public void testInvalidEdOrgRoles() { Mockito.when(edorgHelper.locateNonExpiredSEOAs(Mockito.anyString())).thenReturn(new HashSet<Entity>()); Map<String, List<String>> edOrgRoles = edOrgRoleBuilder.buildValidStaffRoles(realmId, staffId, tenant, samlRoles); Assert.assertNot...
public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.error("Attempted login by a us...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
@Test public void testComposeResponse() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, KeyException, TransformerException, MarshalException, XMLSignatureException, SAXException, IOException, ParserConfigurationException { Mockito.when(sigHelper.signSamlAssertion(Mockito.any(Document.class))).thenA...
public String componseResponse(String destination, String issuer, String requestId, String userId, Map<String, String> attributes, List<String> roles) { String unsignedResponse = createUnsignedResponse(destination, issuer, requestId, userId, attributes, roles); byte[] signedResponse = signResponse(unsignedResponse); re...
SamlResponseComposer { public String componseResponse(String destination, String issuer, String requestId, String userId, Map<String, String> attributes, List<String> roles) { String unsignedResponse = createUnsignedResponse(destination, issuer, requestId, userId, attributes, roles); byte[] signedResponse = signRespons...
SamlResponseComposer { public String componseResponse(String destination, String issuer, String requestId, String userId, Map<String, String> attributes, List<String> roles) { String unsignedResponse = createUnsignedResponse(destination, issuer, requestId, userId, attributes, roles); byte[] signedResponse = signRespons...
SamlResponseComposer { public String componseResponse(String destination, String issuer, String requestId, String userId, Map<String, String> attributes, List<String> roles) { String unsignedResponse = createUnsignedResponse(destination, issuer, requestId, userId, attributes, roles); byte[] signedResponse = signRespons...
SamlResponseComposer { public String componseResponse(String destination, String issuer, String requestId, String userId, Map<String, String> attributes, List<String> roles) { String unsignedResponse = createUnsignedResponse(destination, issuer, requestId, userId, attributes, roles); byte[] signedResponse = signRespons...
@Test (expected = AccessDeniedException.class) public void noMatchingRoles() { Set<Entity> seoas = new HashSet<Entity>(); seoas.add(createSEOA("LEA1", "Random Role1")); seoas.add(createSEOA("LEA1", "Random Role2")); seoas.add(createSEOA("LEA2", "Random Role2")); Mockito.when(edorgHelper.locateNonExpiredSEOAs(Mockito.an...
public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.error("Attempted login by a us...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
@Test (expected = AccessDeniedException.class) public void testNoSamlRoles() { Set<Entity> seoas = new HashSet<Entity>(); seoas.add(createSEOA("LEA1", "IT Admin")); seoas.add(createSEOA("LEA1", "Educator")); seoas.add(createSEOA("LEA2", "Educator")); Mockito.when(edorgHelper.locateNonExpiredSEOAs(Mockito.anyString()))....
public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.error("Attempted login by a us...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
EdOrgContextualRoleBuilder { public Map<String, List<String>> buildValidStaffRoles(String realmId, String staffId, String tenant, List<String> roles) { Set<String> samlRoleSet = new HashSet<String>(roles); Set<Entity> staffEdOrgAssoc = edorgHelper.locateNonExpiredSEOAs(staffId); if (staffEdOrgAssoc.size() == 0) { LOG.e...
@Test public void testEquals() { MutatedContainer m1 = new MutatedContainer(); setParams(m1, "a", "b", null); MutatedContainer m2 = new MutatedContainer(); setParams(m2, "a", "b", null); Assert.assertTrue(m1.equals(m2)); setParams(m1, "a", "b", null); setParams(m2, "c", "b", null); Assert.assertFalse(m1.equals(m2)); se...
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } MutatedContainer rhs = (MutatedContainer) obj; return new EqualsBuilder().append(path, rhs.path) .append(queryParameters, rhs.queryParameters) .append(he...
MutatedContainer { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } MutatedContainer rhs = (MutatedContainer) obj; return new EqualsBuilder().append(path, rhs.path) .append(queryParameters, rhs.queryPar...
MutatedContainer { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } MutatedContainer rhs = (MutatedContainer) obj; return new EqualsBuilder().append(path, rhs.path) .append(queryParameters, rhs.queryPar...
MutatedContainer { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } MutatedContainer rhs = (MutatedContainer) obj; return new EqualsBuilder().append(path, rhs.path) .append(queryParameters, rhs.queryPar...
MutatedContainer { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } MutatedContainer rhs = (MutatedContainer) obj; return new EqualsBuilder().append(path, rhs.path) .append(queryParameters, rhs.queryPar...
@Test public void testMutatePath() throws Exception { String expectedPath; String resultPath; resultPath = rootSearchMutator.mutatePath("v1.0", ResourceNames.ATTENDANCES, "studentId=some_id"); expectedPath = "/" + ResourceNames.STUDENTS + "/" + "some_id" + "/" + ResourceNames.ATTENDANCES; Assert.assertEquals("Invalid m...
public String mutatePath(String version, String resource, String queryParameters) { String mutatedPath = null; Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOURCE_PAIRS) { String curParameter = parameterResourcePair.getLeft(...
RootSearchMutator { public String mutatePath(String version, String resource, String queryParameters) { String mutatedPath = null; Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOURCE_PAIRS) { String curParameter = parameterR...
RootSearchMutator { public String mutatePath(String version, String resource, String queryParameters) { String mutatedPath = null; Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOURCE_PAIRS) { String curParameter = parameterR...
RootSearchMutator { public String mutatePath(String version, String resource, String queryParameters) { String mutatedPath = null; Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOURCE_PAIRS) { String curParameter = parameterR...
RootSearchMutator { public String mutatePath(String version, String resource, String queryParameters) { String mutatedPath = null; Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOURCE_PAIRS) { String curParameter = parameterR...
@Test public void testGetResourceVersionForSearch() { List<PathSegment> segments = getPathSegmentList("v1/search"); MutatedContainer mutated = mock(MutatedContainer.class); when(mutated.getPath()).thenReturn("/search"); assertEquals("Should match", "v1", endpointMutator.getResourceVersion(segments, mutated)); segments ...
protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version; }
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
@Test public void testGetResourceVersion() { List<PathSegment> segments = getPathSegmentList("v1/students"); MutatedContainer mutated = mock(MutatedContainer.class); when(mutated.getPath()).thenReturn("/studentSectionAssociations/1234/students"); assertEquals("Should match", "v1", endpointMutator.getResourceVersion(seg...
protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version; }
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
@Test public void testGetResourceVersionForPublicResources() { List<PathSegment> segments = getPathSegmentList("v1/assessments"); MutatedContainer mutated = mock(MutatedContainer.class); when(mutated.getPath()).thenReturn("/search/assessments"); assertEquals("Should match", "v1", endpointMutator.getResourceVersion(segm...
protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version; }
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
EndpointMutator { protected String getResourceVersion(List<PathSegment> segments, MutatedContainer mutated) { String version = segments.get(0).getPath(); if (mutated.getPath() != null && mutated.getPath().startsWith("/" + ResourceNames.SEARCH + "/") && VERSION_1_0.equals(version)) { return VERSION_1_1; } return version...
@Test(expected = NotFoundException.class) public void testNoPathSegments() throws URISyntaxException { SLIPrincipal principle = mock(SLIPrincipal.class); ClientToken clientToken = mock(ClientToken.class); when(clientToken.getClientId()).thenReturn("theAppId"); OAuth2Authentication auth = mock(OAuth2Authentication.class...
public void mutateURI(Authentication auth, ContainerRequest request) { if (request.getMethod().equals(POST)) { return; } SLIPrincipal user = (SLIPrincipal) auth.getPrincipal(); String clientId = ((OAuth2Authentication) auth).getClientAuthentication().getClientId(); List<PathSegment> segments = sanitizePathSegments(requ...
EndpointMutator { public void mutateURI(Authentication auth, ContainerRequest request) { if (request.getMethod().equals(POST)) { return; } SLIPrincipal user = (SLIPrincipal) auth.getPrincipal(); String clientId = ((OAuth2Authentication) auth).getClientAuthentication().getClientId(); List<PathSegment> segments = sanitiz...
EndpointMutator { public void mutateURI(Authentication auth, ContainerRequest request) { if (request.getMethod().equals(POST)) { return; } SLIPrincipal user = (SLIPrincipal) auth.getPrincipal(); String clientId = ((OAuth2Authentication) auth).getClientAuthentication().getClientId(); List<PathSegment> segments = sanitiz...
EndpointMutator { public void mutateURI(Authentication auth, ContainerRequest request) { if (request.getMethod().equals(POST)) { return; } SLIPrincipal user = (SLIPrincipal) auth.getPrincipal(); String clientId = ((OAuth2Authentication) auth).getClientAuthentication().getClientId(); List<PathSegment> segments = sanitiz...
EndpointMutator { public void mutateURI(Authentication auth, ContainerRequest request) { if (request.getMethod().equals(POST)) { return; } SLIPrincipal user = (SLIPrincipal) auth.getPrincipal(); String clientId = ((OAuth2Authentication) auth).getClientAuthentication().getClientId(); List<PathSegment> segments = sanitiz...
@Test public void testV1Mutate() { PathSegment v1 = Mockito.mock(PathSegment.class); when(v1.getPath()).thenReturn("v1"); when(principal.getEntity()).thenReturn(staff); Assert.assertEquals("Bad endpoint of /v1 is redirected to v1/home safely", createMutatedContainer("/home", "").toString(), mutator.mutate(Arrays.asList...
public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOURCE_PAIRS) { ...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
@Test public void testDeterministicRewrite() { when(principal.getEntity()).thenReturn(null); Map<String, Object> body = new HashMap<String, Object>(); body.put("staffUniqueStateId", "teacher"); Entity teacher = repo.create("teacher", body, "staff"); PathSegment v1 = Mockito.mock(PathSegment.class); when(v1.getPath()).t...
public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOURCE_PAIRS) { ...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
@Test public void testIsPreviouslyIngested() { NeutralRecord originalRecord = createBaseNeutralRecord(); NeutralRecord recordClone = (NeutralRecord) originalRecord.clone(); TenantContext.setTenantId("tenantId"); Mockito.when(mockBatchJobMongoDA.findRecordHash(any(String.class), any(String.class))).thenReturn(null); Moc...
public static boolean isPreviouslyIngested(NeutralRecord n, BatchJobDAO batchJobDAO, DeterministicUUIDGeneratorStrategy dIdStrategy, DeterministicIdResolver didResolver, AbstractMessageReport report, ReportStats reportStats) { boolean isPrevIngested = false; String tenantId = TenantContext.getTenantId(); String sliEnti...
SliDeltaManager { public static boolean isPreviouslyIngested(NeutralRecord n, BatchJobDAO batchJobDAO, DeterministicUUIDGeneratorStrategy dIdStrategy, DeterministicIdResolver didResolver, AbstractMessageReport report, ReportStats reportStats) { boolean isPrevIngested = false; String tenantId = TenantContext.getTenantId...
SliDeltaManager { public static boolean isPreviouslyIngested(NeutralRecord n, BatchJobDAO batchJobDAO, DeterministicUUIDGeneratorStrategy dIdStrategy, DeterministicIdResolver didResolver, AbstractMessageReport report, ReportStats reportStats) { boolean isPrevIngested = false; String tenantId = TenantContext.getTenantId...
SliDeltaManager { public static boolean isPreviouslyIngested(NeutralRecord n, BatchJobDAO batchJobDAO, DeterministicUUIDGeneratorStrategy dIdStrategy, DeterministicIdResolver didResolver, AbstractMessageReport report, ReportStats reportStats) { boolean isPrevIngested = false; String tenantId = TenantContext.getTenantId...
SliDeltaManager { public static boolean isPreviouslyIngested(NeutralRecord n, BatchJobDAO batchJobDAO, DeterministicUUIDGeneratorStrategy dIdStrategy, DeterministicIdResolver didResolver, AbstractMessageReport report, ReportStats reportStats) { boolean isPrevIngested = false; String tenantId = TenantContext.getTenantId...
@Test(expected = MissingConfigException.class) public void missingServer() throws ParseException, MissingConfigException { String[] args = new String[] { "-u", "user", "-pass", "password", "-d", "localDir", "-port", "22" }; propUtils.getUploadProperties(args); }
public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(FLAG_PASSWORD); i...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
@Test public void testMutateSkipForAppAuthRightAdminApp() { SecurityUtil.setUserContext(SecurityUtil.UserContext.STAFF_CONTEXT); Map<String, Object> body = new HashMap<String, Object>(); body.put("staffUniqueStateId", "staff"); teacher = repo.create("staff", body, "staff"); PathSegment v1 = Mockito.mock(PathSegment.cla...
public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOURCE_PAIRS) { ...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
UriMutator { public MutatedContainer mutate(List<PathSegment> segments, String queryParameters, SLIPrincipal principal, String clientId) { Entity user = principal.getEntity(); Map<String, String> parameters = MutatorUtil.getParameterMap(queryParameters); for (Pair<String, String> parameterResourcePair : PARAMETER_RESOU...
@Test public void testGetInferredUrisForTeacherContext() throws Exception { SecurityUtil.setUserContext(SecurityUtil.UserContext.TEACHER_CONTEXT); Assert.assertEquals("inferred uri for teacher resource: /" + ResourceNames.ATTENDANCES + " is incorrect.", createMutatedContainer("/sections/section123/studentSectionAssocia...
public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(rootSearchMuta...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
@Test public void testGetInferredUrisForStaffContext() throws Exception { SecurityUtil.setUserContext(SecurityUtil.UserContext.STAFF_CONTEXT); Assert.assertEquals("inferred uri for staff resource: /" + ResourceNames.ATTENDANCES + " is incorrect.", createMutatedContainer("/schools/edOrg123/studentSchoolAssociations/stud...
public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(rootSearchMuta...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
@Test public void testGetInferredUrisForDualContext() throws Exception { SecurityUtil.setUserContext(SecurityUtil.UserContext.DUAL_CONTEXT); Assert.assertEquals("inferred uri for staff resource: /" + ResourceNames.ATTENDANCES + " is incorrect.", createMutatedContainer("/schools/edOrg123/studentSchoolAssociations/studen...
public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(rootSearchMuta...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
UriMutator { public MutatedContainer mutateBaseUri(String version, String resource, final String queryParameters, Entity user) { MutatedContainer mutated = new MutatedContainer(); mutated.setQueryParameters(queryParameters); if (mutated.getQueryParameters() == null) { mutated.setQueryParameters(""); } mutated.setPath(r...
@Test public void testStudentType() { SLIPrincipal principal = locator.locate(tenant, "testId", "student"); assertTrue(principal.getEntity() != null); assertTrue(principal.getEntity().getType().equals(EntityNames.STUDENT)); }
@Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId); user.setExternalId(externalUserId); user....
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
@Test public void testStaffType() { Set<String> edorgs = new HashSet<String>(); edorgs.add("testEdorg"); Mockito.when(edorgHelper.locateDirectEdorgs((Entity)Matchers.any())).thenReturn(edorgs); SLIPrincipal principal = locator.locate(tenant, "testId", "staff"); assertTrue(principal.getEntity() != null); assertTrue(prin...
@Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId); user.setExternalId(externalUserId); user....
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
@Test(expected = AccessDeniedException.class) public void testInvalidStaff() { Set<String> edorgs = new HashSet<String>(); Mockito.when(edorgHelper.locateDirectEdorgs((Entity)Matchers.any())).thenReturn(edorgs); SLIPrincipal principal = locator.locate(tenant, "testId", "staff"); }
@Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId); user.setExternalId(externalUserId); user....
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
@Test public void testInvalidType() { SLIPrincipal principal = locator.locate(tenant, "testId", "nobody"); assertTrue(principal.getEntity() != null); assertTrue(principal.getEntity().getType().equals("user")); }
@Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId); user.setExternalId(externalUserId); user....
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
MongoUserLocator implements UserLocator { @Override public SLIPrincipal locate(String tenantId, String externalUserId, String userType, String clientId) { LOG.info("Locating user {}@{} of type: {}", new Object[]{externalUserId, tenantId, userType}); SLIPrincipal user = new SLIPrincipal(externalUserId + "@" + tenantId);...
@Test public void sandboxAdminBecomeDeveloperInDevRealm() { Set<Role> roles = resolver.mapRoles(null, DEVELOPER_REALM_ID, sandboxRole, false); assertTrue("sandbox admin is not mapped to developer in developer realm", roles.containsAll(defaultRoles.findAdminRoles(appAndProdLoginUser))); assertTrue("sandbox admin is not ...
@Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(roleNames)); LOG.debug("Mapped admin roles {} to {}.", roleNames,...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
@Test public void sandboxAdminstaysSandboxAdminInAdminRealm() { Set<Role> roles = resolver.mapRoles(null, ADMIN_REALM_ID, sandboxRole, true); assertTrue("sandbox admin is changed in admin realm", roles.containsAll(defaultRoles.findAdminRoles(Arrays.asList(SecureRoleRightAccessImpl.SANDBOX_ADMINISTRATOR)))); assertTrue(...
@Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(roleNames)); LOG.debug("Mapped admin roles {} to {}.", roleNames,...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
@Test public void testIsPreviouslyIngestedModified() { NeutralRecord originalRecord = createBaseNeutralRecord(); NeutralRecord modifiedRecord = (NeutralRecord) originalRecord.clone(); modifiedRecord.getAttributes().put("commonAttrib1", "commonAttrib1_modified_value"); TenantContext.setTenantId("tenantId"); Mockito.when...
public static boolean isPreviouslyIngested(NeutralRecord n, BatchJobDAO batchJobDAO, DeterministicUUIDGeneratorStrategy dIdStrategy, DeterministicIdResolver didResolver, AbstractMessageReport report, ReportStats reportStats) { boolean isPrevIngested = false; String tenantId = TenantContext.getTenantId(); String sliEnti...
SliDeltaManager { public static boolean isPreviouslyIngested(NeutralRecord n, BatchJobDAO batchJobDAO, DeterministicUUIDGeneratorStrategy dIdStrategy, DeterministicIdResolver didResolver, AbstractMessageReport report, ReportStats reportStats) { boolean isPrevIngested = false; String tenantId = TenantContext.getTenantId...
SliDeltaManager { public static boolean isPreviouslyIngested(NeutralRecord n, BatchJobDAO batchJobDAO, DeterministicUUIDGeneratorStrategy dIdStrategy, DeterministicIdResolver didResolver, AbstractMessageReport report, ReportStats reportStats) { boolean isPrevIngested = false; String tenantId = TenantContext.getTenantId...
SliDeltaManager { public static boolean isPreviouslyIngested(NeutralRecord n, BatchJobDAO batchJobDAO, DeterministicUUIDGeneratorStrategy dIdStrategy, DeterministicIdResolver didResolver, AbstractMessageReport report, ReportStats reportStats) { boolean isPrevIngested = false; String tenantId = TenantContext.getTenantId...
SliDeltaManager { public static boolean isPreviouslyIngested(NeutralRecord n, BatchJobDAO batchJobDAO, DeterministicUUIDGeneratorStrategy dIdStrategy, DeterministicIdResolver didResolver, AbstractMessageReport report, ReportStats reportStats) { boolean isPrevIngested = false; String tenantId = TenantContext.getTenantId...
@Test public void roleWithoutProdLoginIsChangedToEmptyGroupInDevRealm() { Set<Role> roles = resolver.mapRoles(null, DEVELOPER_REALM_ID, otherRole, false); assertTrue("other admin is not mapped to developer in developer realm", roles.isEmpty()); }
@Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(roleNames)); LOG.debug("Mapped admin roles {} to {}.", roleNames,...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
DefaultRolesToRightsResolver implements RolesToRightsResolver { @Override public Set<Role> mapRoles(String tenantId, String realmId, List<String> roleNames, boolean isAdminRealm) { Set<Role> roles = new HashSet<Role>(); Entity realm = findRealm(realmId); if (isAdminRealm) { roles.addAll(roleRightAccess.findAdminRoles(r...
@Test public void testMangleListQuery() { DefaultQueryMangler mangler = new DefaultQueryMangler(); NeutralQuery query = new NeutralQuery(); NeutralCriteria baseCriteria = new NeutralCriteria("_id", NeutralCriteria.CRITERIA_IN, Arrays.asList(new String[] {"1", "2", "3"})); SecurityCriteria securityCriteria = new Securit...
public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null; for (NeutralCriteria criteria : query...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
@Test public void testMangleSpecificQuery() { DefaultQueryMangler mangler = new DefaultQueryMangler(); NeutralQuery query = new NeutralQuery(); NeutralCriteria baseCriteria = new NeutralCriteria("_id", NeutralCriteria.CRITERIA_IN, Arrays.asList(new String[] {"1", "2", "3"})); query.addCriteria(baseCriteria); NeutralCri...
public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null; for (NeutralCriteria criteria : query...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
@Test public void testMangleSpecificFailedQuery() { DefaultQueryMangler mangler = new DefaultQueryMangler(); NeutralQuery query = new NeutralQuery(); NeutralCriteria baseCriteria = new NeutralCriteria("_id", NeutralCriteria.CRITERIA_IN, Arrays.asList(new String[] {"1", "2", "3"})); query.addCriteria(baseCriteria); Neut...
public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null; for (NeutralCriteria criteria : query...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
@Test public void testMangleListWithPaging() { DefaultQueryMangler mangler = new DefaultQueryMangler(); NeutralQuery query = new NeutralQuery(); List<String> totalQuery = buildLargeQuery(100); query.setOffset(0); query.setLimit(50); NeutralCriteria baseCriteria = new NeutralCriteria("_id", NeutralCriteria.CRITERIA_IN, ...
public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null; for (NeutralCriteria criteria : query...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
@Test public void testMangleListWithPagingAndQuery() { DefaultQueryMangler mangler = new DefaultQueryMangler(); NeutralQuery query = new NeutralQuery(); List<String> totalQuery = buildLargeQuery(50); query.setOffset(0); query.setLimit(50); NeutralCriteria baseCriteria = new NeutralCriteria("body.something", NeutralCrit...
public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null; for (NeutralCriteria criteria : query...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
DefaultQueryMangler extends Mangler { public NeutralQuery mangleQuery(NeutralQuery query, NeutralCriteria securityCriteria) { LOG.debug(">>>DefaultQueryMangler.mangleQuery()"); setTheQuery(query); setSecurityCriteria(securityCriteria); boolean isList = true; boolean isQueried = false; NeutralCriteria idCriteria = null;...
@Test public void testApplySecurityCriteria() { injector.setAccessAllAdminContext(); SecurityCriteria securityCriteria = new SecurityCriteria(); securityCriteria.setSecurityCriteria(new NeutralCriteria("key", "in", "value")); NeutralQuery query = new NeutralQuery(); query = securityCriteria.applySecurityCriteria(query)...
public NeutralQuery applySecurityCriteria(NeutralQuery query) { if (securityCriteria != null) { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); SLIPrincipal user = (SLIPrincipal) auth.getPrincipal(); if (EntityNames.TEACHER.equals(user.getEntity().getType())) { List<String> ids = (List) se...
SecurityCriteria { public NeutralQuery applySecurityCriteria(NeutralQuery query) { if (securityCriteria != null) { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); SLIPrincipal user = (SLIPrincipal) auth.getPrincipal(); if (EntityNames.TEACHER.equals(user.getEntity().getType())) { List<Stri...
SecurityCriteria { public NeutralQuery applySecurityCriteria(NeutralQuery query) { if (securityCriteria != null) { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); SLIPrincipal user = (SLIPrincipal) auth.getPrincipal(); if (EntityNames.TEACHER.equals(user.getEntity().getType())) { List<Stri...
SecurityCriteria { public NeutralQuery applySecurityCriteria(NeutralQuery query) { if (securityCriteria != null) { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); SLIPrincipal user = (SLIPrincipal) auth.getPrincipal(); if (EntityNames.TEACHER.equals(user.getEntity().getType())) { List<Stri...
SecurityCriteria { public NeutralQuery applySecurityCriteria(NeutralQuery query) { if (securityCriteria != null) { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); SLIPrincipal user = (SLIPrincipal) auth.getPrincipal(); if (EntityNames.TEACHER.equals(user.getEntity().getType())) { List<Stri...
@Test public void testGetArtifactUrl() { setRealm(VALID_SOURCEID); String result = samlHelper.getArtifactUrl(REALM_ID, ARTIFACT); Assert.assertEquals(ARTIFACT_RESOLUTION_ENDPOINT, result); }
public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<String, Object> ...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
@Test(expected = APIAccessDeniedException.class) public void testGetArtifactUrlIncorrectSourceId() { setRealm(INCORRECT_SOURCEID); String result = samlHelper.getArtifactUrl(REALM_ID, ARTIFACT); Assert.assertEquals(ARTIFACT_RESOLUTION_ENDPOINT, result); }
public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<String, Object> ...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
@Test(expected = IllegalArgumentException.class) public void testGetArtifactUrlInvalidSourceIdFormat() { setRealm(NOT_HEX_SOURCEID); String result = samlHelper.getArtifactUrl(REALM_ID, ARTIFACT); Assert.assertEquals(ARTIFACT_RESOLUTION_ENDPOINT, result); }
public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<String, Object> ...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
SamlHelper { public String getArtifactUrl(String realmId, String artifact) { byte[] sourceId = retrieveSourceId(artifact); Entity realm = realmHelper.findRealmById(realmId); if (realm == null) { LOG.error("Invalid realm: " + realmId); throw new APIAccessDeniedException("Authorization could not be verified."); } Map<Str...
@Test public void testEnsureIndexes() { String result = MongoCommander.ensureIndexes("mongoTestIndexes.txt", dbName, mockedMongoTemplate); assertNull(result); for (String collection : shardCollections) { DBObject asskeys = new BasicDBObject(); asskeys.put("creationTime", 1); DBObject options = buildOpts(dbName + "." + ...
public static String ensureIndexes(String indexFile, String db, MongoTemplate mongoTemplate) { Set<MongoIndex> indexes = indexTxtFileParser.parse(indexFile); DB dbConn = getDB(db, mongoTemplate); return ensureIndexes(indexes, dbConn); }
MongoCommander { public static String ensureIndexes(String indexFile, String db, MongoTemplate mongoTemplate) { Set<MongoIndex> indexes = indexTxtFileParser.parse(indexFile); DB dbConn = getDB(db, mongoTemplate); return ensureIndexes(indexes, dbConn); } }
MongoCommander { public static String ensureIndexes(String indexFile, String db, MongoTemplate mongoTemplate) { Set<MongoIndex> indexes = indexTxtFileParser.parse(indexFile); DB dbConn = getDB(db, mongoTemplate); return ensureIndexes(indexes, dbConn); } private MongoCommander(); }
MongoCommander { public static String ensureIndexes(String indexFile, String db, MongoTemplate mongoTemplate) { Set<MongoIndex> indexes = indexTxtFileParser.parse(indexFile); DB dbConn = getDB(db, mongoTemplate); return ensureIndexes(indexes, dbConn); } private MongoCommander(); static String ensureIndexes(String inde...
MongoCommander { public static String ensureIndexes(String indexFile, String db, MongoTemplate mongoTemplate) { Set<MongoIndex> indexes = indexTxtFileParser.parse(indexFile); DB dbConn = getDB(db, mongoTemplate); return ensureIndexes(indexes, dbConn); } private MongoCommander(); static String ensureIndexes(String inde...
@Test public void testInlineDecryption() { Resource inlineAssertionResource = new ClassPathResource("saml/inlineEncryptedAssertion.xml"); EncryptedAssertion encAssertion = createAssertion(inlineAssertionResource); Assertion assertion = samlHelper.decryptAssertion(encAssertion, encryptPKEntry); verifyAssertion(assertion...
protected Assertion decryptAssertion(EncryptedAssertion encryptedAssertion, KeyStore.PrivateKeyEntry keystoreEntry) { BasicX509Credential decryptionCredential = new BasicX509Credential(); decryptionCredential.setPrivateKey(keystoreEntry.getPrivateKey()); StaticKeyInfoCredentialResolver resolver = new StaticKeyInfoCrede...
SamlHelper { protected Assertion decryptAssertion(EncryptedAssertion encryptedAssertion, KeyStore.PrivateKeyEntry keystoreEntry) { BasicX509Credential decryptionCredential = new BasicX509Credential(); decryptionCredential.setPrivateKey(keystoreEntry.getPrivateKey()); StaticKeyInfoCredentialResolver resolver = new Stati...
SamlHelper { protected Assertion decryptAssertion(EncryptedAssertion encryptedAssertion, KeyStore.PrivateKeyEntry keystoreEntry) { BasicX509Credential decryptionCredential = new BasicX509Credential(); decryptionCredential.setPrivateKey(keystoreEntry.getPrivateKey()); StaticKeyInfoCredentialResolver resolver = new Stati...
SamlHelper { protected Assertion decryptAssertion(EncryptedAssertion encryptedAssertion, KeyStore.PrivateKeyEntry keystoreEntry) { BasicX509Credential decryptionCredential = new BasicX509Credential(); decryptionCredential.setPrivateKey(keystoreEntry.getPrivateKey()); StaticKeyInfoCredentialResolver resolver = new Stati...
SamlHelper { protected Assertion decryptAssertion(EncryptedAssertion encryptedAssertion, KeyStore.PrivateKeyEntry keystoreEntry) { BasicX509Credential decryptionCredential = new BasicX509Credential(); decryptionCredential.setPrivateKey(keystoreEntry.getPrivateKey()); StaticKeyInfoCredentialResolver resolver = new Stati...
@Test public void testPeerDecryption() { Resource peerAssertionResource = new ClassPathResource("saml/peerEncryptedAssertion.xml"); EncryptedAssertion encAssertion = createAssertion(peerAssertionResource); Assertion assertion = samlHelper.decryptAssertion(encAssertion, encryptPKEntry); verifyAssertion(assertion); }
protected Assertion decryptAssertion(EncryptedAssertion encryptedAssertion, KeyStore.PrivateKeyEntry keystoreEntry) { BasicX509Credential decryptionCredential = new BasicX509Credential(); decryptionCredential.setPrivateKey(keystoreEntry.getPrivateKey()); StaticKeyInfoCredentialResolver resolver = new StaticKeyInfoCrede...
SamlHelper { protected Assertion decryptAssertion(EncryptedAssertion encryptedAssertion, KeyStore.PrivateKeyEntry keystoreEntry) { BasicX509Credential decryptionCredential = new BasicX509Credential(); decryptionCredential.setPrivateKey(keystoreEntry.getPrivateKey()); StaticKeyInfoCredentialResolver resolver = new Stati...
SamlHelper { protected Assertion decryptAssertion(EncryptedAssertion encryptedAssertion, KeyStore.PrivateKeyEntry keystoreEntry) { BasicX509Credential decryptionCredential = new BasicX509Credential(); decryptionCredential.setPrivateKey(keystoreEntry.getPrivateKey()); StaticKeyInfoCredentialResolver resolver = new Stati...
SamlHelper { protected Assertion decryptAssertion(EncryptedAssertion encryptedAssertion, KeyStore.PrivateKeyEntry keystoreEntry) { BasicX509Credential decryptionCredential = new BasicX509Credential(); decryptionCredential.setPrivateKey(keystoreEntry.getPrivateKey()); StaticKeyInfoCredentialResolver resolver = new Stati...
SamlHelper { protected Assertion decryptAssertion(EncryptedAssertion encryptedAssertion, KeyStore.PrivateKeyEntry keystoreEntry) { BasicX509Credential decryptionCredential = new BasicX509Credential(); decryptionCredential.setPrivateKey(keystoreEntry.getPrivateKey()); StaticKeyInfoCredentialResolver resolver = new Stati...
@Test public void testIsAssertionEncrypted() { Response samlResponse = Mockito.mock(Response.class); Mockito.when(samlResponse.getEncryptedAssertions()).thenReturn(null); boolean result = samlHelper.isAssertionEncrypted(samlResponse); Assert.assertFalse(result); Mockito.when(samlResponse.getEncryptedAssertions()).thenR...
protected boolean isAssertionEncrypted(org.opensaml.saml2.core.Response samlResponse) { if (samlResponse.getEncryptedAssertions() != null && samlResponse.getEncryptedAssertions().size() != 0) { return true; } return false; }
SamlHelper { protected boolean isAssertionEncrypted(org.opensaml.saml2.core.Response samlResponse) { if (samlResponse.getEncryptedAssertions() != null && samlResponse.getEncryptedAssertions().size() != 0) { return true; } return false; } }
SamlHelper { protected boolean isAssertionEncrypted(org.opensaml.saml2.core.Response samlResponse) { if (samlResponse.getEncryptedAssertions() != null && samlResponse.getEncryptedAssertions().size() != 0) { return true; } return false; } }
SamlHelper { protected boolean isAssertionEncrypted(org.opensaml.saml2.core.Response samlResponse) { if (samlResponse.getEncryptedAssertions() != null && samlResponse.getEncryptedAssertions().size() != 0) { return true; } return false; } @PostConstruct void init(); Pair<String, String> createSamlAuthnRequestForRedirec...
SamlHelper { protected boolean isAssertionEncrypted(org.opensaml.saml2.core.Response samlResponse) { if (samlResponse.getEncryptedAssertions() != null && samlResponse.getEncryptedAssertions().size() != 0) { return true; } return false; } @PostConstruct void init(); Pair<String, String> createSamlAuthnRequestForRedirec...
@Test public void testValidateContextToEntities() { EntityDefinition def = createEntityDef("student"); Entity student1 = createEntity("student", 1); Entity student2 = createEntity("student", 2); Entity student3 = createEntity("student", 3); Entity student5 = createEntity("student", 5); Mockito.when(repo.findAll(Mockito...
public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToStringStyle.DEFAULT_STYLE)); LOG.debug(" ids: {}", (ids...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
@Test public void testValidateContextToEntitiesOrphaned() { EntityDefinition def = createEntityDef("student"); Entity student1 = createEntity("student", 1); Map<String, Object> metaData = new HashMap<String, Object>(); metaData.put("createdBy", "staff1"); metaData.put("isOrphaned", "true"); Mockito.when(student1.getMet...
public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToStringStyle.DEFAULT_STYLE)); LOG.debug(" ids: {}", (ids...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
@Test public void testValidateContextToEntitiesSelf() { EntityDefinition def = createEntityDef("staff"); Entity staff1 = createEntity("staff", 1); Mockito.when(repo.findAll(Mockito.matches("staff"), Mockito.any(NeutralQuery.class))).thenReturn(Arrays.asList(staff1)); Mockito.when(edOrgHelper.getDirectEdorgs(Mockito.eq(...
public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToStringStyle.DEFAULT_STYLE)); LOG.debug(" ids: {}", (ids...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
@Test public void testValidateContextToEntitiesCannotAccess() { EntityDefinition def = createEntityDef("student"); Entity student1 = createEntity("student", 1); Mockito.when(repo.findAll(Mockito.matches("student"), Mockito.any(NeutralQuery.class))).thenReturn(Arrays.asList(student1)); Mockito.when(edOrgHelper.getDirect...
public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToStringStyle.DEFAULT_STYLE)); LOG.debug(" ids: {}", (ids...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
@Test public void testValidateContextToEntitiesNoEntitiesInDb() { EntityDefinition def = createEntityDef("student"); Entity student1 = createEntity("student", 1); Mockito.when(repo.findAll(Mockito.matches("student"), Mockito.any(NeutralQuery.class))).thenReturn(new ArrayList<Entity>()); Mockito.when(edOrgHelper.getDire...
public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToStringStyle.DEFAULT_STYLE)); LOG.debug(" ids: {}", (ids...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
@Test public void testValidateContextToEntitiesNotAllValidated() { EntityDefinition def = createEntityDef("student"); Entity student0 = createEntity("student", 0); Entity student1 = createEntity("student", 1); Entity student2 = createEntity("student", 2); Mockito.when(repo.findAll(Mockito.matches("student"), Mockito.an...
public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToStringStyle.DEFAULT_STYLE)); LOG.debug(" ids: {}", (ids...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
@Test public void testValidateContextToEntitiesSelfNoValidators() { EntityDefinition def = createEntityDef("session"); Entity session1 = createEntity("session", 1); Mockito.when(repo.findAll(Mockito.matches("session"), Mockito.any(NeutralQuery.class))).thenReturn(Arrays.asList(session1)); Mockito.when(edOrgHelper.getDi...
public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToStringStyle.DEFAULT_STYLE)); LOG.debug(" ids: {}", (ids...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
ContextValidator implements ApplicationContextAware { public void validateContextToEntities(EntityDefinition def, Collection<String> ids, boolean isTransitive) throws APIAccessDeniedException { LOG.debug(">>>ContextValidator.validateContextToEntities()"); LOG.debug(" def: " + ToStringBuilder.reflectionToString(def, ToS...
@Test public void testEnsureSetIndexes() { String result = MongoCommander.ensureIndexes(indexes, dbName, mockedMongoTemplate); assertNull(result); for (String collection : shardCollections) { DBObject asskeys = new BasicDBObject(); asskeys.put("creationTime", 1); DBObject options = buildOpts(dbName + "." + collection, ...
public static String ensureIndexes(String indexFile, String db, MongoTemplate mongoTemplate) { Set<MongoIndex> indexes = indexTxtFileParser.parse(indexFile); DB dbConn = getDB(db, mongoTemplate); return ensureIndexes(indexes, dbConn); }
MongoCommander { public static String ensureIndexes(String indexFile, String db, MongoTemplate mongoTemplate) { Set<MongoIndex> indexes = indexTxtFileParser.parse(indexFile); DB dbConn = getDB(db, mongoTemplate); return ensureIndexes(indexes, dbConn); } }
MongoCommander { public static String ensureIndexes(String indexFile, String db, MongoTemplate mongoTemplate) { Set<MongoIndex> indexes = indexTxtFileParser.parse(indexFile); DB dbConn = getDB(db, mongoTemplate); return ensureIndexes(indexes, dbConn); } private MongoCommander(); }
MongoCommander { public static String ensureIndexes(String indexFile, String db, MongoTemplate mongoTemplate) { Set<MongoIndex> indexes = indexTxtFileParser.parse(indexFile); DB dbConn = getDB(db, mongoTemplate); return ensureIndexes(indexes, dbConn); } private MongoCommander(); static String ensureIndexes(String inde...
MongoCommander { public static String ensureIndexes(String indexFile, String db, MongoTemplate mongoTemplate) { Set<MongoIndex> indexes = indexTxtFileParser.parse(indexFile); DB dbConn = getDB(db, mongoTemplate); return ensureIndexes(indexes, dbConn); } private MongoCommander(); static String ensureIndexes(String inde...
@Test public void testGetValidatedEntityContexts() { EntityDefinition def = createEntityDef("student"); Mockito.when(edOrgHelper.getDirectEdorgs(Mockito.any(Entity.class))).thenReturn(new HashSet<String>(Arrays.asList("edOrg1"))); boolean isTransitive = false; Mockito.when(ownership.canAccess(Mockito.any(Entity.class),...
public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityUtil.UserContext> entityContexts = new HashMap<String, ...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
@Test public void testGetValidatedEntityContextsOrphaned() { EntityDefinition def = createEntityDef("student"); Entity student1 = createEntity("student", 1); Map<String, Object> metaData = new HashMap<String, Object>(); metaData.put("createdBy", "staff1"); metaData.put("isOrphaned", "true"); Mockito.when(student1.getMe...
public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityUtil.UserContext> entityContexts = new HashMap<String, ...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
@SuppressWarnings("unused") @Test public void testGetValidatedEntityContextsSelf() { EntityDefinition def = createEntityDef("staff"); Entity staff1 = createEntity("staff", 1); List<Entity> staff = Arrays.asList(staff1); Mockito.when(edOrgHelper.getDirectEdorgs(Mockito.eq(staff1))).thenReturn(new HashSet<String>(Arrays....
public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityUtil.UserContext> entityContexts = new HashMap<String, ...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
@SuppressWarnings("unused") @Test public void testGetValidatedEntityContextsCannotAccess() { EntityDefinition def = createEntityDef("student"); Entity student1 = createEntity("student", 1); List<Entity> students = Arrays.asList(student1); Mockito.when(edOrgHelper.getDirectEdorgs(Mockito.eq(student1))).thenReturn(new Ha...
public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityUtil.UserContext> entityContexts = new HashMap<String, ...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
@SuppressWarnings("unused") @Test public void testGetValidatedEntityContextsNoEntitiesInList() { EntityDefinition def = createEntityDef("student"); Entity student1 = createEntity("student", 1); Mockito.when(edOrgHelper.getDirectEdorgs(Mockito.eq(student1))).thenReturn(new HashSet<String>(Arrays.asList("edOrg1"))); bool...
public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityUtil.UserContext> entityContexts = new HashMap<String, ...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
@Test public void testGetValidatedEntityContextsNotAllValidated() { EntityDefinition def = createEntityDef("student"); Entity student0 = createEntity("student", 0); Entity student1 = createEntity("student", 1); Entity student2 = createEntity("student", 2); List<Entity> students = Arrays.asList(student0, student1, stude...
public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityUtil.UserContext> entityContexts = new HashMap<String, ...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
@SuppressWarnings("unused") @Test public void testGetValidatedEntityContextsNoValidators() { EntityDefinition def = createEntityDef("session"); Entity session1 = createEntity("session", 1); List<Entity> sessions = Arrays.asList(session1); Mockito.when(edOrgHelper.getDirectEdorgs(Mockito.eq(session1))).thenReturn(new Ha...
public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityUtil.UserContext> entityContexts = new HashMap<String, ...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
ContextValidator implements ApplicationContextAware { public Map<String, SecurityUtil.UserContext> getValidatedEntityContexts(EntityDefinition def, Collection<Entity> entities, boolean isTransitive, boolean isRead) throws APIAccessDeniedException { if (skipValidation(def, isRead)) { return null; } Map<String, SecurityU...
@Test public void testgetEntityIdsToValidateForgiving() { Entity student0 = createEntity("student", 0); Entity student1 = createEntity("student", 1); Entity student2 = createEntity("student", 2); List<Entity> students = Arrays.asList(student0, student1, student2); boolean isTransitive = false; Mockito.when(ownership.ca...
protected Set<String> getEntityIdsToValidateForgiving(Collection<Entity> entities, boolean isTransitive){ Set<String> entityIdsToValidate = new HashSet<String>(); for (Entity ent : entities) { if (isOrphanCreatedByUser(ent)) { LOG.debug("Entity is orphaned: id {} of type {}", ent.getEntityId(), ent.getType()); } else i...
ContextValidator implements ApplicationContextAware { protected Set<String> getEntityIdsToValidateForgiving(Collection<Entity> entities, boolean isTransitive){ Set<String> entityIdsToValidate = new HashSet<String>(); for (Entity ent : entities) { if (isOrphanCreatedByUser(ent)) { LOG.debug("Entity is orphaned: id {} of...
ContextValidator implements ApplicationContextAware { protected Set<String> getEntityIdsToValidateForgiving(Collection<Entity> entities, boolean isTransitive){ Set<String> entityIdsToValidate = new HashSet<String>(); for (Entity ent : entities) { if (isOrphanCreatedByUser(ent)) { LOG.debug("Entity is orphaned: id {} of...
ContextValidator implements ApplicationContextAware { protected Set<String> getEntityIdsToValidateForgiving(Collection<Entity> entities, boolean isTransitive){ Set<String> entityIdsToValidate = new HashSet<String>(); for (Entity ent : entities) { if (isOrphanCreatedByUser(ent)) { LOG.debug("Entity is orphaned: id {} of...
ContextValidator implements ApplicationContextAware { protected Set<String> getEntityIdsToValidateForgiving(Collection<Entity> entities, boolean isTransitive){ Set<String> entityIdsToValidate = new HashSet<String>(); for (Entity ent : entities) { if (isOrphanCreatedByUser(ent)) { LOG.debug("Entity is orphaned: id {} of...
@Test public void testGetValidIdsIncludeOrphans() { EntityDefinition def = createEntityDef(EntityNames.STUDENT); Entity orphanedStudent = createEntity(EntityNames.STUDENT, 14); Entity accessStudent1 = createEntity(EntityNames.STUDENT, 1); Entity accessStudent2 = createEntity(EntityNames.STUDENT, 2); Entity noAccessStud...
public Set<String> getValidIdsIncludeOrphans(EntityDefinition def, Set<String> ids, boolean isTransitive) throws APIAccessDeniedException { IContextValidator validator = findValidator(def.getType(), isTransitive); if (validator != null) { NeutralQuery getIdsQuery = new NeutralQuery(new NeutralCriteria("_id", "in", new ...
ContextValidator implements ApplicationContextAware { public Set<String> getValidIdsIncludeOrphans(EntityDefinition def, Set<String> ids, boolean isTransitive) throws APIAccessDeniedException { IContextValidator validator = findValidator(def.getType(), isTransitive); if (validator != null) { NeutralQuery getIdsQuery = ...
ContextValidator implements ApplicationContextAware { public Set<String> getValidIdsIncludeOrphans(EntityDefinition def, Set<String> ids, boolean isTransitive) throws APIAccessDeniedException { IContextValidator validator = findValidator(def.getType(), isTransitive); if (validator != null) { NeutralQuery getIdsQuery = ...
ContextValidator implements ApplicationContextAware { public Set<String> getValidIdsIncludeOrphans(EntityDefinition def, Set<String> ids, boolean isTransitive) throws APIAccessDeniedException { IContextValidator validator = findValidator(def.getType(), isTransitive); if (validator != null) { NeutralQuery getIdsQuery = ...
ContextValidator implements ApplicationContextAware { public Set<String> getValidIdsIncludeOrphans(EntityDefinition def, Set<String> ids, boolean isTransitive) throws APIAccessDeniedException { IContextValidator validator = findValidator(def.getType(), isTransitive); if (validator != null) { NeutralQuery getIdsQuery = ...
@Test public void getDoNotIncludeOwningOrphans() { EntityDefinition def = createEntityDef(EntityNames.STUDENT); Entity orphanNotByUser = createEntity(EntityNames.STUDENT, 14); Entity accessStudent1 = createEntity(EntityNames.STUDENT, 1); Entity accessStudent2 = createEntity(EntityNames.STUDENT, 2); Map<String, Object> ...
public Set<String> getValidIdsIncludeOrphans(EntityDefinition def, Set<String> ids, boolean isTransitive) throws APIAccessDeniedException { IContextValidator validator = findValidator(def.getType(), isTransitive); if (validator != null) { NeutralQuery getIdsQuery = new NeutralQuery(new NeutralCriteria("_id", "in", new ...
ContextValidator implements ApplicationContextAware { public Set<String> getValidIdsIncludeOrphans(EntityDefinition def, Set<String> ids, boolean isTransitive) throws APIAccessDeniedException { IContextValidator validator = findValidator(def.getType(), isTransitive); if (validator != null) { NeutralQuery getIdsQuery = ...
ContextValidator implements ApplicationContextAware { public Set<String> getValidIdsIncludeOrphans(EntityDefinition def, Set<String> ids, boolean isTransitive) throws APIAccessDeniedException { IContextValidator validator = findValidator(def.getType(), isTransitive); if (validator != null) { NeutralQuery getIdsQuery = ...
ContextValidator implements ApplicationContextAware { public Set<String> getValidIdsIncludeOrphans(EntityDefinition def, Set<String> ids, boolean isTransitive) throws APIAccessDeniedException { IContextValidator validator = findValidator(def.getType(), isTransitive); if (validator != null) { NeutralQuery getIdsQuery = ...
ContextValidator implements ApplicationContextAware { public Set<String> getValidIdsIncludeOrphans(EntityDefinition def, Set<String> ids, boolean isTransitive) throws APIAccessDeniedException { IContextValidator validator = findValidator(def.getType(), isTransitive); if (validator != null) { NeutralQuery getIdsQuery = ...
@Test public void testPreSplit() { List<DBObject> shards = new ArrayList<DBObject>(); shards.add(new BasicDBObject("_id", "shard0")); shards.add(new BasicDBObject("_id", "shard1")); BasicDBList listShards = new BasicDBList(); listShards.add(new BasicDBObject("shards", shards)); List<String> lShards = new ArrayList<Stri...
public static String preSplit(Set<String> shardCollections, String dbName, MongoTemplate mongoTemplate) { DB dbConn = mongoTemplate.getDb().getSisterDB("admin"); List<String> shards = getShards(dbConn); if (shards.size() == 0) { return null; } String sresult = setBalancerState(dbConn, false); if (sresult != null) { ret...
MongoCommander { public static String preSplit(Set<String> shardCollections, String dbName, MongoTemplate mongoTemplate) { DB dbConn = mongoTemplate.getDb().getSisterDB("admin"); List<String> shards = getShards(dbConn); if (shards.size() == 0) { return null; } String sresult = setBalancerState(dbConn, false); if (sresu...
MongoCommander { public static String preSplit(Set<String> shardCollections, String dbName, MongoTemplate mongoTemplate) { DB dbConn = mongoTemplate.getDb().getSisterDB("admin"); List<String> shards = getShards(dbConn); if (shards.size() == 0) { return null; } String sresult = setBalancerState(dbConn, false); if (sresu...
MongoCommander { public static String preSplit(Set<String> shardCollections, String dbName, MongoTemplate mongoTemplate) { DB dbConn = mongoTemplate.getDb().getSisterDB("admin"); List<String> shards = getShards(dbConn); if (shards.size() == 0) { return null; } String sresult = setBalancerState(dbConn, false); if (sresu...
MongoCommander { public static String preSplit(Set<String> shardCollections, String dbName, MongoTemplate mongoTemplate) { DB dbConn = mongoTemplate.getDb().getSisterDB("admin"); List<String> shards = getShards(dbConn); if (shards.size() == 0) { return null; } String sresult = setBalancerState(dbConn, false); if (sresu...
@Test public void testStaff1() { setContext(staff1, Arrays.asList(SecureRoleRightAccessImpl.IT_ADMINISTRATOR)); List<String> leas = helper.getDistricts(staff1); assertTrue("staff1 must see lea1", leas.contains(lea1.getEntityId())); assertEquals("staff1 must only see one district", 1, leas.size()); }
public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
@Test public void testStaff2() { setContext(staff2, Arrays.asList(SecureRoleRightAccessImpl.IT_ADMINISTRATOR)); List<String> leas = helper.getDistricts(staff2); assertTrue("staff2 must see lea1", leas.contains(lea1.getEntityId())); assertEquals("staff2 must only see one district", 1, leas.size()); }
public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
@Test public void testStaff3() { setContext(staff3, Arrays.asList(SecureRoleRightAccessImpl.IT_ADMINISTRATOR)); List<String> leas = helper.getDistricts(staff3); assertTrue("staff3 must see lea1", leas.contains(lea1.getEntityId())); assertEquals("staff3 must only see one district", 1, leas.size()); }
public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
@Test public void testStaff4() { setContext(staff4, Arrays.asList(SecureRoleRightAccessImpl.IT_ADMINISTRATOR)); List<String> leas = helper.getDistricts(staff4); assertTrue("staff4 must see lea1", leas.contains(lea1.getEntityId())); assertTrue("staff4 must see lea4", leas.contains(lea4.getEntityId())); assertEquals("sta...
public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
@Test public void testTeacher1() { setContext(teacher1, Arrays.asList(SecureRoleRightAccessImpl.EDUCATOR)); List<String> leas = helper.getDistricts(teacher1); assertTrue("teacher1 must see lea1", leas.contains(lea1.getEntityId())); assertEquals("teacher1 must only see one district", 1, leas.size()); }
public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
@Test public void testTeacher2() { setContext(teacher2, Arrays.asList(SecureRoleRightAccessImpl.EDUCATOR)); List<String> leas = helper.getDistricts(teacher2); assertTrue("teacher2 must see lea1", leas.contains(lea1.getEntityId())); assertEquals("teacher2 must only see one district", 1, leas.size()); }
public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
@Test public void testTeacher3() { setContext(teacher3, Arrays.asList(SecureRoleRightAccessImpl.EDUCATOR)); List<String> leas = helper.getDistricts(teacher3); assertTrue("teacher3 must see lea1", leas.contains(lea1.getEntityId())); assertEquals("teacher3 must only see one district", 1, leas.size()); }
public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } }
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
EdOrgHelper { public List<String> getDistricts(Entity user) { Set<String> directAssoc = getDirectEdorgs(user); return getDistricts(directAssoc); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity...
@Test public void testTeacher3LocateSEOAs() { NeutralQuery staffQuery = new NeutralQuery(); staffQuery.addCriteria(new NeutralCriteria(ParameterConstants.STAFF_UNIQUE_STATE_ID, NeutralCriteria.OPERATOR_EQUAL, teacher3.getEntityId())); repo.deleteAll(EntityNames.STAFF_ED_ORG_ASSOCIATION, staffQuery); Date now = new Date...
public Set<Entity> locateNonExpiredSEOAs(String staffId) { Set<Entity> validAssociations = new HashSet<Entity>(); NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, NeutralCriteria.OPERATOR_EQUAL, staffId)); Iterable<Entity> associations = repo.findAll(EntityNames.STAFF_E...
EdOrgHelper { public Set<Entity> locateNonExpiredSEOAs(String staffId) { Set<Entity> validAssociations = new HashSet<Entity>(); NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, NeutralCriteria.OPERATOR_EQUAL, staffId)); Iterable<Entity> associations = repo.findAll(Entit...
EdOrgHelper { public Set<Entity> locateNonExpiredSEOAs(String staffId) { Set<Entity> validAssociations = new HashSet<Entity>(); NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, NeutralCriteria.OPERATOR_EQUAL, staffId)); Iterable<Entity> associations = repo.findAll(Entit...
EdOrgHelper { public Set<Entity> locateNonExpiredSEOAs(String staffId) { Set<Entity> validAssociations = new HashSet<Entity>(); NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, NeutralCriteria.OPERATOR_EQUAL, staffId)); Iterable<Entity> associations = repo.findAll(Entit...
EdOrgHelper { public Set<Entity> locateNonExpiredSEOAs(String staffId) { Set<Entity> validAssociations = new HashSet<Entity>(); NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, NeutralCriteria.OPERATOR_EQUAL, staffId)); Iterable<Entity> associations = repo.findAll(Entit...
@Test public void testParents() { RequestUtil.setCurrentRequestId(); List<String> edorgs = helper.getParentEdOrgs(school3); assertTrue(edorgs.contains(sea1.getEntityId())); assertTrue(edorgs.contains(lea1.getEntityId())); assertTrue(edorgs.contains(lea2.getEntityId())); assertTrue(edorgs.contains(lea3.getEntityId())); ...
public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEdOrgs.add(myId)...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
@Test public void testParentsWithCycle() { RequestUtil.setCurrentRequestId(); List<String> edorgs = helper.getParentEdOrgs(leaCycle1); assertFalse("leaCycle1 should not be a child of leaCycle1", edorgs.contains(leaCycle1.getEntityId())); assertTrue("leaCycle2 should be a child of leaCycle1", edorgs.contains(leaCycle2.g...
public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEdOrgs.add(myId)...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
@Test public void parseJSTest() { IndexJSFileParser indexJSFileParser = new IndexJSFileParser(); Set<MongoIndex> indexes = indexJSFileParser.parse(INDEX_FILE); Map<String, MongoIndex> expectedIndexes = new HashMap<String, MongoIndex>(); DBObject userSessionIndex = new BasicDBObject(); userSessionIndex.put("body.expirat...
@Override public Set<MongoIndex> parse(String fileName) { Map<String, Object> indexMap = null; File resourceFile = null; FileInputStream fstream = null; BufferedReader br = null; Set<MongoIndex> indexes = new HashSet<MongoIndex>(); try { URL resourceURL = Thread.currentThread().getContextClassLoader().getResource(fileN...
IndexJSFileParser implements IndexParser<String> { @Override public Set<MongoIndex> parse(String fileName) { Map<String, Object> indexMap = null; File resourceFile = null; FileInputStream fstream = null; BufferedReader br = null; Set<MongoIndex> indexes = new HashSet<MongoIndex>(); try { URL resourceURL = Thread.curren...
IndexJSFileParser implements IndexParser<String> { @Override public Set<MongoIndex> parse(String fileName) { Map<String, Object> indexMap = null; File resourceFile = null; FileInputStream fstream = null; BufferedReader br = null; Set<MongoIndex> indexes = new HashSet<MongoIndex>(); try { URL resourceURL = Thread.curren...
IndexJSFileParser implements IndexParser<String> { @Override public Set<MongoIndex> parse(String fileName) { Map<String, Object> indexMap = null; File resourceFile = null; FileInputStream fstream = null; BufferedReader br = null; Set<MongoIndex> indexes = new HashSet<MongoIndex>(); try { URL resourceURL = Thread.curren...
IndexJSFileParser implements IndexParser<String> { @Override public Set<MongoIndex> parse(String fileName) { Map<String, Object> indexMap = null; File resourceFile = null; FileInputStream fstream = null; BufferedReader br = null; Set<MongoIndex> indexes = new HashSet<MongoIndex>(); try { URL resourceURL = Thread.curren...
@Test public void testParentsOfSea() { RequestUtil.setCurrentRequestId(); List<String> edorgs = helper.getParentEdOrgs(sea1); assertEquals(0, edorgs.size()); }
public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEdOrgs.add(myId)...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
@Test public void testStudent1() { Set<String> edorgs = helper.getDirectEdorgs(student1); assertEquals(1, edorgs.size()); assertTrue("student1 should see school1", edorgs.contains(school1.getEntityId())); assertFalse("student1 should not see school2", edorgs.contains(school2.getEntityId())); assertFalse("student1 shoul...
public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); }
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } }
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } }
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfE...
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfE...
@Test public void testStudent2() { Set<String> edorgs = helper.getDirectEdorgs(student2); assertEquals(1, edorgs.size()); assertFalse("student2 should not see school1", edorgs.contains(school1.getEntityId())); assertTrue("student2 should see school2", edorgs.contains(school2.getEntityId())); assertFalse("student2 shoul...
public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); }
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } }
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } }
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfE...
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfE...
@Test public void testStudent3() { Set<String> edorgs = helper.getDirectEdorgs(student3); assertEquals(1, edorgs.size()); assertFalse("student3 should not see school1", edorgs.contains(school1.getEntityId())); assertFalse("student3 should not see school2", edorgs.contains(school2.getEntityId())); assertTrue("student3 s...
public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); }
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } }
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } }
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfE...
EdOrgHelper { public Set<String> getDirectEdorgs() { LOG.trace(">>>EdOrgHelper.getDirectEdorgs()"); return getDirectEdorgs(SecurityUtil.getSLIPrincipal().getEntity()); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfE...
@Test public void testHeirarchicalEdorgs() { RequestUtil.setCurrentRequestId(); List<String> edorgs = helper.getParentEdOrgs(school1); assertEquals(2, edorgs.size()); assertFalse("school1 should not see lea3", edorgs.contains(lea3.getEntityId())); assertFalse("school1 should not see lea2", edorgs.contains(lea2.getEntit...
public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEdOrgs.add(myId)...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
EdOrgHelper { public List<String> getParentEdOrgs(Entity edOrgEntity) { List<String> toReturn = new ArrayList<String>(); Map<String, Entity> edOrgCache = loadEdOrgCache(); Set<String> visitedEdOrgs = new HashSet<String>(); if (edOrgEntity != null) { String myId = edOrgEntity.getEntityId(); if (myId != null) { visitedEd...
@Test public void testGetChildLeaOfEdorgs() { List<String> edorgs = helper.getDirectChildLEAsOfEdOrg(lea2); assertEquals(1, edorgs.size()); assertFalse("lea1 should not be a child of lea2", edorgs.contains(lea1.getEntityId())); assertFalse("lea2 should not be a child of lea2", edorgs.contains(lea2.getEntityId())); asse...
public List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity) { Set<String> result; if (edOrgEntity == null) { return null; } result = getDirectChildLEAsOfEdOrg(edOrgEntity.getEntityId()); if (result == null || result.isEmpty()) { return null; } return new ArrayList<String>(result); }
EdOrgHelper { public List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity) { Set<String> result; if (edOrgEntity == null) { return null; } result = getDirectChildLEAsOfEdOrg(edOrgEntity.getEntityId()); if (result == null || result.isEmpty()) { return null; } return new ArrayList<String>(result); } }
EdOrgHelper { public List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity) { Set<String> result; if (edOrgEntity == null) { return null; } result = getDirectChildLEAsOfEdOrg(edOrgEntity.getEntityId()); if (result == null || result.isEmpty()) { return null; } return new ArrayList<String>(result); } }
EdOrgHelper { public List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity) { Set<String> result; if (edOrgEntity == null) { return null; } result = getDirectChildLEAsOfEdOrg(edOrgEntity.getEntityId()); if (result == null || result.isEmpty()) { return null; } return new ArrayList<String>(result); } @PostConstruct ...
EdOrgHelper { public List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity) { Set<String> result; if (edOrgEntity == null) { return null; } result = getDirectChildLEAsOfEdOrg(edOrgEntity.getEntityId()); if (result == null || result.isEmpty()) { return null; } return new ArrayList<String>(result); } @PostConstruct ...
@Test public void testGetAllChildLeaOfEdorgs() { Set<String> edorgs = helper.getAllChildLEAsOfEdOrg(sea1); assertEquals(4, edorgs.size()); assertTrue("lea1 should be a child of sea1", edorgs.contains(lea1.getEntityId())); assertTrue("lea2 should be a child of sea1", edorgs.contains(lea2.getEntityId())); assertTrue("lea...
public Set<String> getAllChildLEAsOfEdOrg(Entity edOrgEntity) { String myId; Set<String> edOrgs = new HashSet<String>(); Set<String> result = new HashSet<String>(); if (edOrgEntity == null || edOrgEntity.getEntityId() == null) { return null; } myId = edOrgEntity.getEntityId(); edOrgs.add(myId); result = getAllChildLEAs...
EdOrgHelper { public Set<String> getAllChildLEAsOfEdOrg(Entity edOrgEntity) { String myId; Set<String> edOrgs = new HashSet<String>(); Set<String> result = new HashSet<String>(); if (edOrgEntity == null || edOrgEntity.getEntityId() == null) { return null; } myId = edOrgEntity.getEntityId(); edOrgs.add(myId); result = g...
EdOrgHelper { public Set<String> getAllChildLEAsOfEdOrg(Entity edOrgEntity) { String myId; Set<String> edOrgs = new HashSet<String>(); Set<String> result = new HashSet<String>(); if (edOrgEntity == null || edOrgEntity.getEntityId() == null) { return null; } myId = edOrgEntity.getEntityId(); edOrgs.add(myId); result = g...
EdOrgHelper { public Set<String> getAllChildLEAsOfEdOrg(Entity edOrgEntity) { String myId; Set<String> edOrgs = new HashSet<String>(); Set<String> result = new HashSet<String>(); if (edOrgEntity == null || edOrgEntity.getEntityId() == null) { return null; } myId = edOrgEntity.getEntityId(); edOrgs.add(myId); result = g...
EdOrgHelper { public Set<String> getAllChildLEAsOfEdOrg(Entity edOrgEntity) { String myId; Set<String> edOrgs = new HashSet<String>(); Set<String> result = new HashSet<String>(); if (edOrgEntity == null || edOrgEntity.getEntityId() == null) { return null; } myId = edOrgEntity.getEntityId(); edOrgs.add(myId); result = g...
@Test public void testGetAllChildLeaOfEdorgsWithCycle() { Set<String> edorgs = helper.getAllChildLEAsOfEdOrg(leaCycle1); assertEquals(2, edorgs.size()); assertFalse("leaCycle1 should not be a child of leaCycle1", edorgs.contains(leaCycle1.getEntityId())); assertTrue("leaCycle2 should be a child of leaCycle1", edorgs.co...
public Set<String> getAllChildLEAsOfEdOrg(Entity edOrgEntity) { String myId; Set<String> edOrgs = new HashSet<String>(); Set<String> result = new HashSet<String>(); if (edOrgEntity == null || edOrgEntity.getEntityId() == null) { return null; } myId = edOrgEntity.getEntityId(); edOrgs.add(myId); result = getAllChildLEAs...
EdOrgHelper { public Set<String> getAllChildLEAsOfEdOrg(Entity edOrgEntity) { String myId; Set<String> edOrgs = new HashSet<String>(); Set<String> result = new HashSet<String>(); if (edOrgEntity == null || edOrgEntity.getEntityId() == null) { return null; } myId = edOrgEntity.getEntityId(); edOrgs.add(myId); result = g...
EdOrgHelper { public Set<String> getAllChildLEAsOfEdOrg(Entity edOrgEntity) { String myId; Set<String> edOrgs = new HashSet<String>(); Set<String> result = new HashSet<String>(); if (edOrgEntity == null || edOrgEntity.getEntityId() == null) { return null; } myId = edOrgEntity.getEntityId(); edOrgs.add(myId); result = g...
EdOrgHelper { public Set<String> getAllChildLEAsOfEdOrg(Entity edOrgEntity) { String myId; Set<String> edOrgs = new HashSet<String>(); Set<String> result = new HashSet<String>(); if (edOrgEntity == null || edOrgEntity.getEntityId() == null) { return null; } myId = edOrgEntity.getEntityId(); edOrgs.add(myId); result = g...
EdOrgHelper { public Set<String> getAllChildLEAsOfEdOrg(Entity edOrgEntity) { String myId; Set<String> edOrgs = new HashSet<String>(); Set<String> result = new HashSet<String>(); if (edOrgEntity == null || edOrgEntity.getEntityId() == null) { return null; } myId = edOrgEntity.getEntityId(); edOrgs.add(myId); result = g...
@Test public void testGetChildEdOrgsNameWithoutParents() { Set<String> children = helper.getChildEdOrgsName(Arrays.asList(lea2.getEntityId(), leaCycle1.getEntityId())); assertTrue("expected to see school2 in the list of children", children.contains(school2.getBody().get(ParameterConstants.STATE_ORGANIZATION_ID))); asse...
public Set<String> getChildEdOrgsName(Collection<String> parentEdOrgIds) { return getChildEdOrgsName(parentEdOrgIds, false); }
EdOrgHelper { public Set<String> getChildEdOrgsName(Collection<String> parentEdOrgIds) { return getChildEdOrgsName(parentEdOrgIds, false); } }
EdOrgHelper { public Set<String> getChildEdOrgsName(Collection<String> parentEdOrgIds) { return getChildEdOrgsName(parentEdOrgIds, false); } }
EdOrgHelper { public Set<String> getChildEdOrgsName(Collection<String> parentEdOrgIds) { return getChildEdOrgsName(parentEdOrgIds, false); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity); Set...
EdOrgHelper { public Set<String> getChildEdOrgsName(Collection<String> parentEdOrgIds) { return getChildEdOrgsName(parentEdOrgIds, false); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity); Set...
@Test public void testGetChildEdOrgsNameWithParents() { Set<String> children = helper.getChildEdOrgsName(Arrays.asList(lea2.getEntityId(), leaCycle1.getEntityId()), true); assertTrue("expected to see lea2 in the list of children", children.contains(lea2.getBody().get(ParameterConstants.STATE_ORGANIZATION_ID))); assertT...
public Set<String> getChildEdOrgsName(Collection<String> parentEdOrgIds) { return getChildEdOrgsName(parentEdOrgIds, false); }
EdOrgHelper { public Set<String> getChildEdOrgsName(Collection<String> parentEdOrgIds) { return getChildEdOrgsName(parentEdOrgIds, false); } }
EdOrgHelper { public Set<String> getChildEdOrgsName(Collection<String> parentEdOrgIds) { return getChildEdOrgsName(parentEdOrgIds, false); } }
EdOrgHelper { public Set<String> getChildEdOrgsName(Collection<String> parentEdOrgIds) { return getChildEdOrgsName(parentEdOrgIds, false); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity); Set...
EdOrgHelper { public Set<String> getChildEdOrgsName(Collection<String> parentEdOrgIds) { return getChildEdOrgsName(parentEdOrgIds, false); } @PostConstruct void init(); List<String> getDistricts(Entity user); List<String> getDistricts(Set<String> edOrgs); List<String> getDirectChildLEAsOfEdOrg(Entity edOrgEntity); Set...
@Test public void parseTxtTest() { IndexTxtFileParser indexTxtFileParser = new IndexTxtFileParser(); Set<MongoIndex> indexes = indexTxtFileParser.parse(INDEX_TXT_FILE); assertEquals(2, indexes.size()); Map<String, MongoIndex> expectedIndex = new HashMap<String, MongoIndex>(); DBObject adminDelegationIndex = new BasicDB...
@Override public Set<MongoIndex> parse(String fileName) { Set<String> indexSet = loadIndexes(fileName); return new IndexSliFormatParser().parse(indexSet); }
IndexTxtFileParser implements IndexParser<String> { @Override public Set<MongoIndex> parse(String fileName) { Set<String> indexSet = loadIndexes(fileName); return new IndexSliFormatParser().parse(indexSet); } }
IndexTxtFileParser implements IndexParser<String> { @Override public Set<MongoIndex> parse(String fileName) { Set<String> indexSet = loadIndexes(fileName); return new IndexSliFormatParser().parse(indexSet); } }
IndexTxtFileParser implements IndexParser<String> { @Override public Set<MongoIndex> parse(String fileName) { Set<String> indexSet = loadIndexes(fileName); return new IndexSliFormatParser().parse(indexSet); } @Override Set<MongoIndex> parse(String fileName); static Set<String> loadIndexes(String indexFile); }
IndexTxtFileParser implements IndexParser<String> { @Override public Set<MongoIndex> parse(String fileName) { Set<String> indexSet = loadIndexes(fileName); return new IndexSliFormatParser().parse(indexSet); } @Override Set<MongoIndex> parse(String fileName); static Set<String> loadIndexes(String indexFile); }
@Test public void testLoginRealmIdsForSEA() { Entity sea = buildEdOrg("SEA1", null, true); Entity lea = buildEdOrg("LEA", sea, false); Entity seaStaff = buildStaff("SEA Staff", sea); Entity seaRealm = buildRealm(sea); Entity leaRealm = buildRealm(lea); RequestUtil.setCurrentRequestId(); assertTrue(helper.isUserAllowedL...
public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgHelper.locateDi...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
@Test public void testLoginRealmIdsForLEA() { Entity sea = buildEdOrg("SEA1", null, true); Entity lea = buildEdOrg("LEA", sea, false); Entity leaStaff = buildStaff("LEA Staff", lea); Entity seaRealm = buildRealm(sea); Entity leaRealm = buildRealm(lea); RequestUtil.setCurrentRequestId(); assertFalse(helper.isUserAllowed...
public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgHelper.locateDi...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
@Test public void testSeaWithNoDirectRealm() { Entity sea = buildEdOrg("SEA1", null, true); Entity lea1 = buildEdOrg("LEA1", sea, false); Entity lea2 = buildEdOrg("LEA2", lea1, false); Entity lea1Realm = buildRealm(lea1); Entity lea2Realm = buildRealm(lea2); Entity seaStaff = buildStaff("SEA Staff", sea); RequestUtil.s...
public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgHelper.locateDi...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
@Test public void testLeaWithNoDirectRealm() { Entity sea = buildEdOrg("SEA1", null, true); Entity lea1 = buildEdOrg("LEA1", sea, false); Entity lea2 = buildEdOrg("LEA2", lea1, false); Entity lea3 = buildEdOrg("LEA3", lea2, false); Entity lea1Realm = buildRealm(lea1); Entity lea3Realm = buildRealm(lea3); Entity seaReal...
public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgHelper.locateDi...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
@Test public void testSeaWithNoDirectRealmAndTwoAssociations() { Entity sea = buildEdOrg("SEA1", null, true); Entity lea1 = buildEdOrg("LEA1", sea, false); Entity lea2 = buildEdOrg("LEA2", lea1, false); Entity lea3 = buildEdOrg("LEA3", lea2, false); Entity lea1Realm = buildRealm(lea1); Entity lea3Realm = buildRealm(lea...
public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgHelper.locateDi...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
@Test public void testSeaWithNoDirectRealmAndTwoRealmsOnSameTier() { Entity sea = buildEdOrg("SEA1", null, true); Entity lea1 = buildEdOrg("LEA1", sea, false); Entity lea2 = buildEdOrg("LEA2", sea, false); Entity lea3 = buildEdOrg("LEA3", lea1, false); Entity lea1Realm = buildRealm(lea1); Entity lea2Realm = buildRealm(...
public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgHelper.locateDi...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
RealmHelper { public boolean isUserAllowedLoginToRealm(Entity userEntity, Entity realm) { if (isSandboxEnabled) { return true; } List<String> preferredRealms = getPreferredLoginRealmIds(userEntity); if (preferredRealms.size() > 0) { return preferredRealms.contains(realm.getEntityId()); } Set<String> userEdorgs = edorgH...
@Test public void testGetAssociatedRealmIsTenantSpecific() { Entity sea = buildEdOrg("SEA1", null, injector.TENANT_ID, true); Entity lea1 = buildEdOrg("LEA1", sea, injector.TENANT_ID, false); Entity lea2 = buildEdOrg("LEA1", null, "Two", false); Entity lea2Realm = buildRealm(lea2, "Two"); Entity lea1Realm = buildRealm(...
public Set<String> getAssociatedRealmIds() { HashSet<String> toReturn = new HashSet<String>(); if (isSandboxEnabled) { toReturn.add(getSandboxRealmId()); } else { NeutralQuery realmQuery = new NeutralQuery(); String edOrg = SecurityUtil.getEdOrg(); LOG.debug("Looking up realms for edorg {}.", edOrg); realmQuery.addCrit...
RealmHelper { public Set<String> getAssociatedRealmIds() { HashSet<String> toReturn = new HashSet<String>(); if (isSandboxEnabled) { toReturn.add(getSandboxRealmId()); } else { NeutralQuery realmQuery = new NeutralQuery(); String edOrg = SecurityUtil.getEdOrg(); LOG.debug("Looking up realms for edorg {}.", edOrg); real...
RealmHelper { public Set<String> getAssociatedRealmIds() { HashSet<String> toReturn = new HashSet<String>(); if (isSandboxEnabled) { toReturn.add(getSandboxRealmId()); } else { NeutralQuery realmQuery = new NeutralQuery(); String edOrg = SecurityUtil.getEdOrg(); LOG.debug("Looking up realms for edorg {}.", edOrg); real...
RealmHelper { public Set<String> getAssociatedRealmIds() { HashSet<String> toReturn = new HashSet<String>(); if (isSandboxEnabled) { toReturn.add(getSandboxRealmId()); } else { NeutralQuery realmQuery = new NeutralQuery(); String edOrg = SecurityUtil.getEdOrg(); LOG.debug("Looking up realms for edorg {}.", edOrg); real...
RealmHelper { public Set<String> getAssociatedRealmIds() { HashSet<String> toReturn = new HashSet<String>(); if (isSandboxEnabled) { toReturn.add(getSandboxRealmId()); } else { NeutralQuery realmQuery = new NeutralQuery(); String edOrg = SecurityUtil.getEdOrg(); LOG.debug("Looking up realms for edorg {}.", edOrg); real...
@Test @ExpectedException(value = AccessDeniedException.class) public void testDenyWritingOutsideOfEdOrgHierarchyCreate() { EntityBody entityBody = new EntityBody(); entityBody.put(ParameterConstants.SCHOOL_ID, UN_ASSOCIATED_ED_ORG); when(uriInfo.getPathSegments()).thenReturn(postPath); writeValidator.validateWriteReque...
public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to referenced entity."...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
@Test public void testValidWritingInEdOrgHierarchyCreate() { EntityBody entityBody = new EntityBody(); entityBody.put(ParameterConstants.SCHOOL_ID, ED_ORG_B); when(uriInfo.getPathSegments()).thenReturn(postPath); writeValidator.validateWriteRequest(entityBody, uriInfo, principal); }
public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to referenced entity."...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
@Test @ExpectedException(value = AccessDeniedException.class) public void testDenyUpdateWhenNoEdOrgMatchToExistingEntity() { EntityBody entityBody = new EntityBody(); entityBody.put(ParameterConstants.SCHOOL_ID, ED_ORG_A); existingSection.getBody().put(ParameterConstants.SCHOOL_ID, UN_ASSOCIATED_ED_ORG); when(uriInfo.g...
public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to referenced entity."...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
@Test public void testPurgingSystemCollections() throws Exception { RangedWorkNote workNote = RangedWorkNote.createSimpleWorkNote(BATCHJOBID); Exchange ex = Mockito.mock(Exchange.class); Message message = Mockito.mock(Message.class); Mockito.when(ex.getIn()).thenReturn(message); Mockito.when(message.getBody(RangedWorkN...
@Override public void process(Exchange exchange) throws Exception { Stage stage = Stage.createAndStartStage(BATCH_JOB_STAGE, BATCH_JOB_STAGE_DESC); String batchJobId = getBatchJobId(exchange); if (batchJobId != null) { reportStats = new SimpleReportStats(); NewBatchJob newJob = null; try { newJob = batchJobDAO.findBatc...
PurgeProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { Stage stage = Stage.createAndStartStage(BATCH_JOB_STAGE, BATCH_JOB_STAGE_DESC); String batchJobId = getBatchJobId(exchange); if (batchJobId != null) { reportStats = new SimpleReportStats(); NewBatchJob newJob = nul...
PurgeProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { Stage stage = Stage.createAndStartStage(BATCH_JOB_STAGE, BATCH_JOB_STAGE_DESC); String batchJobId = getBatchJobId(exchange); if (batchJobId != null) { reportStats = new SimpleReportStats(); NewBatchJob newJob = nul...
PurgeProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { Stage stage = Stage.createAndStartStage(BATCH_JOB_STAGE, BATCH_JOB_STAGE_DESC); String batchJobId = getBatchJobId(exchange); if (batchJobId != null) { reportStats = new SimpleReportStats(); NewBatchJob newJob = nul...
PurgeProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { Stage stage = Stage.createAndStartStage(BATCH_JOB_STAGE, BATCH_JOB_STAGE_DESC); String batchJobId = getBatchJobId(exchange); if (batchJobId != null) { reportStats = new SimpleReportStats(); NewBatchJob newJob = nul...
@Test @ExpectedException(value = AccessDeniedException.class) public void testDenyUpdateWhenNoEdOrgMatchToNewEntity() { EntityBody entityBody = new EntityBody(); entityBody.put(ParameterConstants.SCHOOL_ID, UN_ASSOCIATED_ED_ORG); existingSection.getBody().put(ParameterConstants.SCHOOL_ID, ED_ORG_B); when(uriInfo.getPat...
public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to referenced entity."...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
@Test public void testValidUpdate() { EntityBody entityBody = new EntityBody(); entityBody.put(ParameterConstants.SCHOOL_ID, ED_ORG_A); existingSection.getBody().put(ParameterConstants.SCHOOL_ID, ED_ORG_B); when(uriInfo.getPathSegments()).thenReturn(putPath); writeValidator.validateWriteRequest(entityBody, uriInfo, pri...
public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to referenced entity."...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...