use of org.orcid.jaxb.model.v3.dev1.record.Name in project ORCID-Source by ORCID.
the class OrcidSecurityManager_generalTest method testName_CanRead_When_HaveReadScope_IsLimited.
@Test
public void testName_CanRead_When_HaveReadScope_IsLimited() {
SecurityContextTestUtils.setUpSecurityContext(ORCID_1, CLIENT_1, ScopePathType.ORCID_BIO_READ_LIMITED);
Name name = createName(Visibility.LIMITED);
orcidSecurityManager.checkAndFilter(ORCID_1, name, ScopePathType.ORCID_BIO_READ_LIMITED);
}
use of org.orcid.jaxb.model.v3.dev1.record.Name in project ORCID-Source by ORCID.
the class OrcidSecurityManager_generalTest method testName_CantRead_When_HaveReadScope_IsPrivate.
@Test(expected = OrcidVisibilityException.class)
public void testName_CantRead_When_HaveReadScope_IsPrivate() {
SecurityContextTestUtils.setUpSecurityContext(ORCID_1, CLIENT_1, ScopePathType.ORCID_BIO_READ_LIMITED);
Name name = createName(Visibility.PRIVATE);
orcidSecurityManager.checkAndFilter(ORCID_1, name, ScopePathType.ORCID_BIO_READ_LIMITED);
fail();
}
use of org.orcid.jaxb.model.v3.dev1.record.Name in project ORCID-Source by ORCID.
the class OrcidSecurityManager_generalTest method testName_CanRead_When_DontHaveReadScope_IsPublic.
@Test
public void testName_CanRead_When_DontHaveReadScope_IsPublic() {
SecurityContextTestUtils.setUpSecurityContext(ORCID_1, CLIENT_1, ScopePathType.ORCID_BIO_UPDATE);
Name name = createName(Visibility.PUBLIC);
orcidSecurityManager.checkAndFilter(ORCID_1, name, ScopePathType.ORCID_BIO_READ_LIMITED);
}
use of org.orcid.jaxb.model.v3.dev1.record.Name in project ORCID-Source by ORCID.
the class OrcidSecurityManager_generalTest method testName_CanRead_When_ReadPublicToken_IsPublic.
/**
* =================== checkAndFilter test's ===================
*/
// ---- ELEMENTS WITHOUT SOURCE ----
// Name element tests
@Test
public void testName_CanRead_When_ReadPublicToken_IsPublic() {
SecurityContextTestUtils.setUpSecurityContext(ORCID_1, CLIENT_1, ScopePathType.READ_PUBLIC);
Name name = createName(Visibility.PUBLIC);
orcidSecurityManager.checkAndFilter(ORCID_1, name, ScopePathType.ORCID_BIO_READ_LIMITED);
}
use of org.orcid.jaxb.model.v3.dev1.record.Name in project ORCID-Source by ORCID.
the class OrcidSecurityManager_generalTest method testName_CantRead_When_DontHaveReadScope_IsLimited.
@Test(expected = OrcidAccessControlException.class)
public void testName_CantRead_When_DontHaveReadScope_IsLimited() {
SecurityContextTestUtils.setUpSecurityContext(ORCID_1, CLIENT_1, ScopePathType.ORCID_BIO_UPDATE);
Name name = createName(Visibility.LIMITED);
orcidSecurityManager.checkAndFilter(ORCID_1, name, ScopePathType.ORCID_BIO_READ_LIMITED);
fail();
}
Aggregations