Commit Graph

11 Commits

Author SHA1 Message Date
Konstantina Galouni 031192b9fb [Admin Tools | log4j2]: Added swagger | log4j2.xml: Updated log4j settings - default file is spring log file | pom.xml: Added scm & updated version of libraries and parent. 2022-10-10 13:52:19 +03:00
Konstantina Galouni 6e14c0b41b [Admin tools | Trunk]: Added endpoing for purging browser cache.
1. admintools.properties: Added property "admintool.cache.url".
2. BrowserCacheConfig.java: Added config for browser cache properties.
3. UoaAdminToolsApplication.java: In EnableConfigurationProperties added BrowserCacheConfig.
4. BrowserCacheController.java: Added class and method "purge()" (/cache/{pid}) for purging browser cache for a specific community.
2022-08-11 12:50:59 +00:00
Konstantinos Triantafyllou 38833860e3 Update admin tools library 2021-12-07 11:21:43 +00:00
Konstantina Galouni 7e5d71828e [Trunk | Admin Tools Service]:
1. pom.xml: 
        a. Added timestamp in properties.
        b. In <build> added <resources> with filtering set to true.
2. GlobalVars.java: Added GlobalVars class for date of deploy & date of build.
3. UoaAdminToolsApplication.java: 
	a. Added  @PropertySource("classpath:authorization.properties") and @PropertySource("classpath:admintoolslibrary.properties").
	b. In @EnableConfigurationProperties added GlobalVars.class.
4. AdminToolsCheckDeployController.java: Added exposing date of deploy and date of build.
5. admintools.properties: Added property admintool.globalVars.buildDate=@timestamp@.
2021-09-15 22:02:16 +00:00
Konstantinos Triantafyllou 946c099fee [Admin Tools | Trunk]: Remove notification components 2021-02-26 10:16:25 +00:00
Konstantinos Triantafyllou 6484343d2f [Admin Tools | Trunk]: Add get managers method. Delete no needed files. 2021-02-25 19:00:05 +00:00
Konstantina Galouni 6c452b5433 [Trunk | Admin Tools]:
1. pom.xml: Added dependency for spring security.
2. UoaAdminToolsApplication.java: Import AuthorizationConfiguration.class | Remove SecurityConfig.class from @EnableConfigurationProperties.
3. UoaAdminToolsConfiguration.java: Comment "addInterceptors()" method calling AuthorizationHandler with SecurityConfig.
4. SecurityConfig.java & AuthorizationHandler.java & AuthorizationUtils.java & CommunityInfo.java & UserInfo.java: Commented all contents of these files (files will be deleted in coming commit).
5. PortalSubscribersController.java: Comment imports from commeted files.
6. Notifications.java: Added field "aaiId" get getters and setters.
7. NotificationsController.java:
        a. Method "getNotifications()" is replaced by "getNotificationsForUser()" (/community/{pid}/notifications) - returns notification settings only for user who made the request (uoa-authorization-li$
        b. Path changed for method "getNotifications()": /community/{pid}/notifications/all
        c. Remove "@RequestBody String email" parameter from method "deleteNotification()" - get email from user who made the request (uoa-authorization-library).
        d. In method "saveNotification()" get aaiId and email from user who made the request (uoa-authorization-library).
        e. Added checks and throw Exceptions in all methods.
        f. Added @PreAuthorize
                Portal Admins: "getNotifications()" (/community/{pid}/notifications/all) 
                Portal Admins - Curators - Managers: "getNotificationsForUser()" (/community/{pid}/notifications), "deleteNotification()" (/community/{pid}/notifications), "saveNotification()" (/communit$
8. ExploreController.java:
        a. Added checks and throw Exceptions in all methods.
        b. Added @PreAuthorize
                Portal Admins: "updateExplore()" (/explore/update), "insertExplore()" (/explore/save), "deleteExplore()" (/explore/delete).
9. ConnectController.java:
        a. Added checks and throw Exceptions in all methods.
        b. Added @PreAuthorize
                Portal Admins: "updateConnect()" (/connect/update), "insertConnect()" (/connect/save), "deleteConnect()" (/connect/delete).
        c. Commented methods "getLayoutForConnect()" and "updateLayoutForConnect()" (/connect/{pid}/layout).
10. CommunityController.java:
        a. Added checks and throw Exceptions in all methods.
        b. Added @PreAuthorize
                Portal Admins: "updateCommunity()" (/community/update), "insertCommunity()" (/community/save), "deleteCommunity()" (/community/delete).
                Portal Admin - Curators - Managers: "updateLayoutForCommunity()" (/community/{pid}/layout).
11. CuratorController.java: 
        a. In "insertCurator() (/curator) set _id field with aaiId from user who made the request (uoa-authorization-library).
        b. Added @PreAuthorize
                Authenticated users: "getCuratorById()" (/curator/{id}), "insertCurator()" (/curator).
                Portal Admins: "deleteCurators()" (/curator).
2021-02-25 11:57:22 +00:00
Konstantina Galouni f2ca4c4275 [Trunk | Admin Tools]: Merging branch 'use-UoaAdminToolsLibrary' into trunk for revisions 58365:59468 2020-09-24 12:02:39 +00:00
Konstantina Galouni 04d9e7a91f [Trunk | Admin Tools Service]:
1. admintools.properties & UoaAdminToolsApplication.java: Uncomment admintools.properties and ignore if @PropertySource for dnet-override.properties not found, to let tests runs.
2. Subscriber.java: Add default constructor and constructor with email parameter.
3. CommunitySubscribersController.java: 
	a. Autowire SecurityConfig to let methods get UserInfo via token.
	b. Add GET method "getNumberOfSubscribersPerCommunity()" (/community/{pid}/subscribers/count).
	c. Add GET methos "getIsSubscribedToCommunity()" (/community/{pid}/is-subscriber): Return true/ false and gets user email via token in @RequestHeader("X-XSRF-TOKEN").
	d. Method "addSubscriberInCommunity()" renamed to "addSubscriberInCommunityByEmail()" | Method "deleteSubscriberFromCommunity()" renamed to "deleteSubscriberFromCommunityByEmail()".
	e. Add POST methods "addSubscriberInCommunity()" (/community/{pid}/subscriber) and "deleteSubscriberFromCommunity()" (/community/{pid}/subscriber/delete):
		Return true/ false and get user email via token in  @RequestHeader("X-XSRF-TOKEN").
	f. Method getCommunitiesPerSubcriber(@RequestParam(value="email", required = true) String email) --> getCommunitiesPerSubcriber(@RequestHeader("X-XSRF-TOKEN") String token):
		Get user email via token in  @RequestHeader("X-XSRF-TOKEN").
4. update_db.js: 
	a. Add method "createNewPagesForConnect()": adds page "/publications" for connect (enabled).
	b. Add method "createNewPagesForCommunities()": adds pages "/content" (enabled), "/projects" (disabled), "/national-bulletins" (disabled), "/subjects"(disabled) for communities.
	c. Add method "removeContentPolicyPageAndAddHelpTextInCommunitiesSourcesPage()": remove old "/content" connect page and move its contents to new "/content" for every community (NOT connect & openaire).
2020-04-10 12:34:43 +00:00
Argiro Kokogiannaki a642920ba7 [Uoa-admin-tool|Trunk]
Properties: use classpath instead of path of specific tomcats
Recaptcha: add logs and catch exceptions
2020-03-31 12:36:56 +00:00
Konstantina Galouni 69abc67c5c All files moved to /trunk directory (improving project structure in svn). 2020-03-31 12:02:29 +00:00