Project

General

Profile

« Previous | Next » 

Revision 60495

[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)

View differences:

pom.xml
51 51
            <scope>test</scope>
52 52
        </dependency>
53 53

  
54
<!--        <dependency>-->
55
<!--            <groupId>org.springframework.boot</groupId>-->
56
<!--            <artifactId>spring-boot-starter-security</artifactId>-->
57
<!--        </dependency>-->
54
        <dependency>
55
            <groupId>org.springframework.boot</groupId>
56
            <artifactId>spring-boot-starter-security</artifactId>
57
        </dependency>
58 58

  
59 59
        <dependency>
60 60
            <groupId>log4j</groupId>
......
77 77
            <version>20030203.000550</version>
78 78
        </dependency>
79 79

  
80
<!--        <dependency>-->
81
<!--            <groupId>eu.dnetlib</groupId>-->
82
<!--            <artifactId>uoa-authorization-library</artifactId>-->
83
<!--            <version>1.0.0-SNAPSHOT</version>-->
84
<!--        </dependency>-->
80
        <dependency>
81
            <groupId>eu.dnetlib</groupId>
82
            <artifactId>uoa-authorization-library</artifactId>
83
            <version>1.0.0-SNAPSHOT</version>
84
        </dependency>
85 85
    </dependencies>
86 86

  
87 87
    <build>

Also available in: Unified diff