Project

General

Profile

« Previous | Next » 

Revision 60501

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

View differences:

UserInfo.java
1
package eu.dnetlib.uoaadmintools.handlers.utils;
2

  
3
import java.util.ArrayList;
4
import java.util.List;
5

  
6
/**
7
 * Created by argirok on 23/6/2017.
8
 */
9
public class UserInfo {
10
    String name;
11
    String email;
12
    List<String> edu_person_entitlements =  new ArrayList<String>();
13

  
14
    @Override
15
    public String toString() {
16
        return "UserInfo{" +
17
                "name='" + name + '\'' +
18
                ", email='" + email + '\'' +
19
                ", edu_person_entitlements=" + edu_person_entitlements +
20
                '}';
21
    }
22

  
23
    public String getName() {
24
        return name;
25
    }
26

  
27
    public void setName(String name) {
28
        this.name = name;
29
    }
30

  
31
    public String getEmail() {
32
        return email;
33
    }
34

  
35
    public void setEmail(String email) {
36
        this.email = email;
37
    }
38

  
39
    public List<String> getEdu_person_entitlements() {
40
        return edu_person_entitlements;
41
    }
42

  
43
    public void setEdu_person_entitlements(List<String> edu_person_entitlements) {
44
        this.edu_person_entitlements = edu_person_entitlements;
45
    }
46
}
1
//package eu.dnetlib.uoaadmintools.handlers.utils;
2
//
3
//import java.util.ArrayList;
4
//import java.util.List;
5
//
6
///**
7
// * Created by argirok on 23/6/2017.
8
// */
9
//public class UserInfo {
10
//    String name;
11
//    String email;
12
//    List<String> edu_person_entitlements =  new ArrayList<String>();
13
//
14
//    @Override
15
//    public String toString() {
16
//        return "UserInfo{" +
17
//                "name='" + name + '\'' +
18
//                ", email='" + email + '\'' +
19
//                ", edu_person_entitlements=" + edu_person_entitlements +
20
//                '}';
21
//    }
22
//
23
//    public String getName() {
24
//        return name;
25
//    }
26
//
27
//    public void setName(String name) {
28
//        this.name = name;
29
//    }
30
//
31
//    public String getEmail() {
32
//        return email;
33
//    }
34
//
35
//    public void setEmail(String email) {
36
//        this.email = email;
37
//    }
38
//
39
//    public List<String> getEdu_person_entitlements() {
40
//        return edu_person_entitlements;
41
//    }
42
//
43
//    public void setEdu_person_entitlements(List<String> edu_person_entitlements) {
44
//        this.edu_person_entitlements = edu_person_entitlements;
45
//    }
46
//}

Also available in: Unified diff