diff --git a/orcid-core/src/main/java/org/orcid/core/common/manager/impl/EventManagerImpl.java b/orcid-core/src/main/java/org/orcid/core/common/manager/impl/EventManagerImpl.java index 297a6d9b3de..de62d256865 100644 --- a/orcid-core/src/main/java/org/orcid/core/common/manager/impl/EventManagerImpl.java +++ b/orcid-core/src/main/java/org/orcid/core/common/manager/impl/EventManagerImpl.java @@ -37,7 +37,7 @@ public boolean removeEvents(String orcid) { @Override public void createEvent(String orcid, EventType eventType, HttpServletRequest request, RequestInfoForm requestInfoForm) { - String label = null; + String label = "Website"; String clientId = null; String redirectUrl = null; String publicPage = null; @@ -62,8 +62,6 @@ public void createEvent(String orcid, EventType eventType, HttpServletRequest re ClientDetailsEntity clientDetailsEntity = clientDetailsEntityCacheManager.retrieve(clientId); label = "OAuth " + clientDetailsEntity.getClientName(); } - } else { - label = "Website"; } } diff --git a/orcid-persistence/src/main/resources/db/updates/create_event_table.xml b/orcid-persistence/src/main/resources/db/updates/create_event_table.xml index 07d72de0cd4..a350620aeeb 100644 --- a/orcid-persistence/src/main/resources/db/updates/create_event_table.xml +++ b/orcid-persistence/src/main/resources/db/updates/create_event_table.xml @@ -22,7 +22,7 @@ baseColumnNames="orcid" referencedTableName="profile" referencedColumnNames="orcid"/> - + diff --git a/orcid-persistence/src/main/resources/db/updates/dw_event.xml b/orcid-persistence/src/main/resources/db/updates/dw_event.xml index 871803de491..7276d186fd0 100644 --- a/orcid-persistence/src/main/resources/db/updates/dw_event.xml +++ b/orcid-persistence/src/main/resources/db/updates/dw_event.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd"> - + @@ -22,7 +22,7 @@ GRANT SELECT ON TABLE dw_event to dw_user; - + diff --git a/orcid-persistence/src/test/java/org/orcid/persistence/EventDaoTest.java b/orcid-persistence/src/test/java/org/orcid/persistence/EventDaoTest.java index 0b17e0a3079..84ff1491e49 100644 --- a/orcid-persistence/src/test/java/org/orcid/persistence/EventDaoTest.java +++ b/orcid-persistence/src/test/java/org/orcid/persistence/EventDaoTest.java @@ -70,7 +70,7 @@ public void testWriteSpam() throws IllegalAccessException { @Test public void testRemoveSpam() throws NoResultException { - List eventEntities = eventDao.getEvents(OTHER_USER_ORCID); + List eventEntities = eventDao.getEvents(USER_ORCID); assertNotNull(eventEntities); eventDao.removeEvents(eventEntities.get(0).getOrcid()); } diff --git a/orcid-test/src/main/resources/data/EventEntityData.xml b/orcid-test/src/main/resources/data/EventEntityData.xml index dc4747d37d6..c5fa142a18e 100644 --- a/orcid-test/src/main/resources/data/EventEntityData.xml +++ b/orcid-test/src/main/resources/data/EventEntityData.xml @@ -3,10 +3,7 @@ @@ -14,10 +11,7 @@ @@ -25,10 +19,7 @@