Project

General

Profile

« Previous | Next » 

Revision 60107

[Trunk | Monitor Service]:
1. StakeholderController.java & TopicController.java & CategoryController.java & SubCategoryController.java && SectionController.java && IndicatorController.java:
a. Comment logs for get requests.
b. Use "ForbiddenException" instead of "AccessDeniedException"
c. On /save, if full entity has id (already in DB), if not found in DB throw EntityNotFoundException.
d. Get children (e.g. when saving a Topic, get its categories) from DB.
2. TopicController.java & CategoryController.java & SubCategoryController.java & SectionController.java:
In /reorder, if there are in DB, ids that are missing from reordered list, do reordering and add in the end of list the missing ids.
3. ReorderEvent.java: [NEW] Added class ReorderEvent with fields "action" (String), "target" (String), "ids" (List<String>) (used in IndicatorController.java).
4. IndicatorController.java:
a. In /reorder, @RequestBody changed from List<String> indicators to ReorderEvent reorderEvent.
b. If there are in DB, ids that are missing from reordered list AND missing id is not moved to other section (action = removed and target = missing id), do reordering and add in the end of list the missing ids.
5. ExceptionsHandler.java: exception handler methods "invalidInput()", "nullPointerException()", "notFoundException()" moved to "Admin Tools Library" - "accessDeniedException()" is removed.
6. responses/ExceptionResponse.java: File and folder deleted (moved to "Admin Tools Library").
7. RolesUtils.java: Added method "isLoggedIn()" (checks if no roles for user, or user has role "ROLE_ANONYMOUS").

View differences:

RolesUtils.java
55 55
        return roles.contains(authorizationService.member(type, id));
56 56
    }
57 57

  
58
    public boolean isLoggedIn(List<String> roles) {
59
        if(roles == null || roles.contains(authorizationService.ANONYMOUS_USER)) {
60
            return false;
61
        }
62
        return true;
63
    }
64

  
58 65
    public boolean hasUpdateAuthority(List<String> roles, String type, String id) {
59 66
        return isPortalAdmin(roles) || isCurator(roles, type) || isManager(roles, type, id);
60 67
    }

Also available in: Unified diff