[Trunk | Admin tools library Service]: Initial commit of project - Common files & methods copied from admin tools service.
1. Entities: common entities are Community, Entity, Page, DivId, PageHelpContent, DivHelpContent (+ fullEntities), email: Email, EmailRecaptcha, GoogleResponse.
2. DAOs: DAOs for common entities are CommunityDAO, EntityDAO, PageDAO, DivIdDAO, PageHelpContentDAO, DivHelpContentDAO (+MongoDBDAOs).
3. Controllers: controllers for common entities are CommunityController, EntityController, PageController, DivIdController, PageHelpContentController, DivHelpContentController
(comment references to community specific entities e.g. Statistics, Subscribers, Layout).
4. Configuration: common configuration files are GoogleConfig, MailConfig.
5. For email: emailSender/EmailSender.java & handlers/InvalidReCaptchaException.java & recaptcha/VerifyRecaptcha.java.
6. Resources: log4j.properties.
2020-01-23 17:05:17 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
|
|
|
|
<groupId>eu.dnetlib</groupId>
|
|
|
|
<artifactId>uoa-admin-tools-library</artifactId>
|
|
|
|
<version>1.0.0-SNAPSHOT</version>
|
|
|
|
<packaging>jar</packaging>
|
|
|
|
|
|
|
|
<name>uoa-admin-tools-library</name>
|
|
|
|
|
|
|
|
<parent>
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
|
|
<version>1.5.8.RELEASE</version>
|
|
|
|
<relativePath/> <!-- lookup parent from repository -->
|
|
|
|
</parent>
|
|
|
|
|
|
|
|
<properties>
|
|
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
|
|
<java.version>1.8</java.version>
|
2021-09-15 23:58:27 +02:00
|
|
|
<timestampAdminToolsLibrary>${maven.build.timestamp}</timestampAdminToolsLibrary>
|
|
|
|
<maven.build.timestamp.format>E MMM dd HH:mm:ss z yyyy</maven.build.timestamp.format>
|
[Trunk | Admin tools library Service]: Initial commit of project - Common files & methods copied from admin tools service.
1. Entities: common entities are Community, Entity, Page, DivId, PageHelpContent, DivHelpContent (+ fullEntities), email: Email, EmailRecaptcha, GoogleResponse.
2. DAOs: DAOs for common entities are CommunityDAO, EntityDAO, PageDAO, DivIdDAO, PageHelpContentDAO, DivHelpContentDAO (+MongoDBDAOs).
3. Controllers: controllers for common entities are CommunityController, EntityController, PageController, DivIdController, PageHelpContentController, DivHelpContentController
(comment references to community specific entities e.g. Statistics, Subscribers, Layout).
4. Configuration: common configuration files are GoogleConfig, MailConfig.
5. For email: emailSender/EmailSender.java & handlers/InvalidReCaptchaException.java & recaptcha/VerifyRecaptcha.java.
6. Resources: log4j.properties.
2020-01-23 17:05:17 +01:00
|
|
|
</properties>
|
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
|
|
<exclusions>
|
|
|
|
<exclusion>
|
|
|
|
<groupId> org.springframework.boot</groupId>
|
|
|
|
<artifactId>spring-boot-starter-logging</artifactId>
|
|
|
|
</exclusion>
|
|
|
|
</exclusions>
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
|
|
<scope>provided</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
|
|
|
|
[Trunk | Admin Tools Library]:
1. pom.xml: Added in dependency for spring security and and for uoa-authorization-library.
2. UoaAdminToolsLibraryApplication.java: import "AuthorizationConfiguration.class".
3. RolesUtils.java: Added folder handlers/utils and file handlers/utils/RolesUtils.java to get roles and info of user from authorization library.
4. AdminToolsLibraryExceptionsHandler.java: call setStatus of ExceptionResponse in handlers that status was not set | Use log.error instead of log.debug.
5. DivHelpContentService.java: Added checks and throw Exceptions in methods "deleteDivHelpContents()" and "toggleDivHelpContent()".
6. PageHelpContentService.java: Added checks and throw Exceptions in methods "deletePageHelpContents()" and "togglePageHelpContent()".
7. PortalService.java: Added checks and throw Exceptions in method "togglePage()".
8. EntityController.java: Added @PreAuthorize
Portal Admins: methods "insertEntity()" (/entity/save), "updateEntity()" (/entity/update), "deleteEntities()" (/entity/delete).
9. DivIdController.java: Added @PreAuthorize
Portal Admins: methods "insertDivId()" (/div/save), "updateDivId()" (/div/update), "deleteDivIds()" (/div/delete).
10. PageController.java: Added @PreAuthorize
Portal Admins: methods "insertPage()" (/page/save), "updatePage()" (/page/update), "deletePages()" (/page/delete).
11. AdminPortalRelationsController.java:
a. Added checks and throw Exceptions in methods "getEntitiesForCommunity()",
"getDivHelpContent()", "saveDivHelpContent()", "updateDivHelpContent()", "deleteDivHelpContents()", "toggleDivHelpContent()",
"togglePage()",
"getPageHelpContent()", "savePageHelpContent()", "updatePageHelpContent()", "deletePageHelpContents()", "togglePageHelpContent()"
b. Added @PreAuthorize
Portals Admin - Curators - Managers: "toggleEntity()" (/{portalType}/{pid}/entity/toggle),
"saveDivHelpContent()" (/{portalType}/{pid}/divhelpcontent/save), "updateDivHelpContent()" (/{portalType}/{pid}/divhelpcontent/update),
"deleteDivHelpContents()" (/{portalType}/{pid|/divhelpcontent/delete), "toggleDivHelpContent()" (/{portalType}/{pid|/divhelpcontent/toggle),
"togglePage()" (/{portalType}/{pid}/page/toggle),
"savePageHelpContent()" (/{portalType}/{pid}/pagehelpcontent/save), "updatePageHelpContent()" (/{portalType}/{pid}/pagehelpcontent/update),
"deletePageHelpContents()" (/{portalType}/{pid|/pagehelpcontent/delete), "togglePageHelpContent()" (/{portalType}/{pid|/pagehelpcontent/toggle)
2021-02-25 11:03:23 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
<artifactId>spring-boot-starter-security</artifactId>
|
|
|
|
</dependency>
|
2020-09-24 11:57:20 +02:00
|
|
|
|
[Trunk | Admin tools library Service]: Initial commit of project - Common files & methods copied from admin tools service.
1. Entities: common entities are Community, Entity, Page, DivId, PageHelpContent, DivHelpContent (+ fullEntities), email: Email, EmailRecaptcha, GoogleResponse.
2. DAOs: DAOs for common entities are CommunityDAO, EntityDAO, PageDAO, DivIdDAO, PageHelpContentDAO, DivHelpContentDAO (+MongoDBDAOs).
3. Controllers: controllers for common entities are CommunityController, EntityController, PageController, DivIdController, PageHelpContentController, DivHelpContentController
(comment references to community specific entities e.g. Statistics, Subscribers, Layout).
4. Configuration: common configuration files are GoogleConfig, MailConfig.
5. For email: emailSender/EmailSender.java & handlers/InvalidReCaptchaException.java & recaptcha/VerifyRecaptcha.java.
6. Resources: log4j.properties.
2020-01-23 17:05:17 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>log4j</groupId>
|
|
|
|
<artifactId>log4j</artifactId>
|
|
|
|
<version>1.2.17</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>com.google.code.gson</groupId>
|
|
|
|
<artifactId>gson</artifactId>
|
|
|
|
<version>2.8.2</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>javax.mail</groupId>
|
|
|
|
<artifactId>mail</artifactId>
|
|
|
|
<version>1.5.0-b01</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>commons-io</groupId>
|
|
|
|
<artifactId>commons-io</artifactId>
|
|
|
|
<version>20030203.000550</version>
|
|
|
|
</dependency>
|
2020-09-24 11:57:20 +02:00
|
|
|
|
[Trunk | Admin Tools Library]:
1. pom.xml: Added in dependency for spring security and and for uoa-authorization-library.
2. UoaAdminToolsLibraryApplication.java: import "AuthorizationConfiguration.class".
3. RolesUtils.java: Added folder handlers/utils and file handlers/utils/RolesUtils.java to get roles and info of user from authorization library.
4. AdminToolsLibraryExceptionsHandler.java: call setStatus of ExceptionResponse in handlers that status was not set | Use log.error instead of log.debug.
5. DivHelpContentService.java: Added checks and throw Exceptions in methods "deleteDivHelpContents()" and "toggleDivHelpContent()".
6. PageHelpContentService.java: Added checks and throw Exceptions in methods "deletePageHelpContents()" and "togglePageHelpContent()".
7. PortalService.java: Added checks and throw Exceptions in method "togglePage()".
8. EntityController.java: Added @PreAuthorize
Portal Admins: methods "insertEntity()" (/entity/save), "updateEntity()" (/entity/update), "deleteEntities()" (/entity/delete).
9. DivIdController.java: Added @PreAuthorize
Portal Admins: methods "insertDivId()" (/div/save), "updateDivId()" (/div/update), "deleteDivIds()" (/div/delete).
10. PageController.java: Added @PreAuthorize
Portal Admins: methods "insertPage()" (/page/save), "updatePage()" (/page/update), "deletePages()" (/page/delete).
11. AdminPortalRelationsController.java:
a. Added checks and throw Exceptions in methods "getEntitiesForCommunity()",
"getDivHelpContent()", "saveDivHelpContent()", "updateDivHelpContent()", "deleteDivHelpContents()", "toggleDivHelpContent()",
"togglePage()",
"getPageHelpContent()", "savePageHelpContent()", "updatePageHelpContent()", "deletePageHelpContents()", "togglePageHelpContent()"
b. Added @PreAuthorize
Portals Admin - Curators - Managers: "toggleEntity()" (/{portalType}/{pid}/entity/toggle),
"saveDivHelpContent()" (/{portalType}/{pid}/divhelpcontent/save), "updateDivHelpContent()" (/{portalType}/{pid}/divhelpcontent/update),
"deleteDivHelpContents()" (/{portalType}/{pid|/divhelpcontent/delete), "toggleDivHelpContent()" (/{portalType}/{pid|/divhelpcontent/toggle),
"togglePage()" (/{portalType}/{pid}/page/toggle),
"savePageHelpContent()" (/{portalType}/{pid}/pagehelpcontent/save), "updatePageHelpContent()" (/{portalType}/{pid}/pagehelpcontent/update),
"deletePageHelpContents()" (/{portalType}/{pid|/pagehelpcontent/delete), "togglePageHelpContent()" (/{portalType}/{pid|/pagehelpcontent/toggle)
2021-02-25 11:03:23 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>eu.dnetlib</groupId>
|
|
|
|
<artifactId>uoa-authorization-library</artifactId>
|
|
|
|
<version>1.0.0-SNAPSHOT</version>
|
|
|
|
</dependency>
|
[Trunk | Admin tools library Service]: Initial commit of project - Common files & methods copied from admin tools service.
1. Entities: common entities are Community, Entity, Page, DivId, PageHelpContent, DivHelpContent (+ fullEntities), email: Email, EmailRecaptcha, GoogleResponse.
2. DAOs: DAOs for common entities are CommunityDAO, EntityDAO, PageDAO, DivIdDAO, PageHelpContentDAO, DivHelpContentDAO (+MongoDBDAOs).
3. Controllers: controllers for common entities are CommunityController, EntityController, PageController, DivIdController, PageHelpContentController, DivHelpContentController
(comment references to community specific entities e.g. Statistics, Subscribers, Layout).
4. Configuration: common configuration files are GoogleConfig, MailConfig.
5. For email: emailSender/EmailSender.java & handlers/InvalidReCaptchaException.java & recaptcha/VerifyRecaptcha.java.
6. Resources: log4j.properties.
2020-01-23 17:05:17 +01:00
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<!-- <plugin>-->
|
|
|
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
|
|
|
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
|
|
|
<!-- </plugin>-->
|
|
|
|
<!--3d answer: https://stackoverflow.com/questions/23260057/the-forked-vm-terminated-without-saying-properly-goodbye-vm-crash-or-system-exi-->
|
|
|
|
<!--If you use openjdk there might be a problem with surfire plugin - uncomment following lines-->
|
|
|
|
<!--<plugin>-->
|
|
|
|
<!--<groupId>org.apache.maven.plugins</groupId>-->
|
|
|
|
<!--<artifactId>maven-surefire-plugin</artifactId>-->
|
|
|
|
<!--<version>2.19.1</version>-->
|
|
|
|
<!--<configuration>-->
|
|
|
|
<!--<!–<testFailureIgnore>true</testFailureIgnore>–>-->
|
|
|
|
<!--<useSystemClassLoader>false</useSystemClassLoader>-->
|
|
|
|
<!--</configuration>-->
|
|
|
|
<!--</plugin>-->
|
|
|
|
</plugins>
|
|
|
|
<finalName>uoa-admin-tools-library</finalName>
|
2021-09-15 23:58:27 +02:00
|
|
|
<resources>
|
|
|
|
<resource>
|
|
|
|
<directory>src/main/resources</directory>
|
|
|
|
<filtering>true</filtering>
|
|
|
|
</resource>
|
|
|
|
</resources>
|
[Trunk | Admin tools library Service]: Initial commit of project - Common files & methods copied from admin tools service.
1. Entities: common entities are Community, Entity, Page, DivId, PageHelpContent, DivHelpContent (+ fullEntities), email: Email, EmailRecaptcha, GoogleResponse.
2. DAOs: DAOs for common entities are CommunityDAO, EntityDAO, PageDAO, DivIdDAO, PageHelpContentDAO, DivHelpContentDAO (+MongoDBDAOs).
3. Controllers: controllers for common entities are CommunityController, EntityController, PageController, DivIdController, PageHelpContentController, DivHelpContentController
(comment references to community specific entities e.g. Statistics, Subscribers, Layout).
4. Configuration: common configuration files are GoogleConfig, MailConfig.
5. For email: emailSender/EmailSender.java & handlers/InvalidReCaptchaException.java & recaptcha/VerifyRecaptcha.java.
6. Resources: log4j.properties.
2020-01-23 17:05:17 +01:00
|
|
|
</build>
|
|
|
|
|
|
|
|
|
|
|
|
</project>
|