Ignore:
Timestamp:
12/20/13 15:59:51 (10 years ago)
Author:
olhsha
Message:

following Eric's instruction in security management in Dasish: removing a separate security DB, making authentication tables the part of the main DB, keeping hashed passwords. Used spring-security configuration for hashes with BCryptPasswordEncoder as recommended.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/AnnotationResource.java

    r4207 r4209  
    124124            return rootElement;
    125125        } else {
    126             httpServletResponse.sendError(HttpServletResponse.SC_FORBIDDEN);
     126            httpServletResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "The logged-in user cannot read the annotation.");
    127127            return null;
    128128        }
     
    145145            return new ObjectFactory().createTargetList(TargetList);
    146146        } else {
    147             httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);
     147            httpServletResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "The logged-in user cannot read the annotation.");
    148148            return null;
    149149        }
     
    188188            return new ObjectFactory().createPermissionList(permissionList);
    189189        } else {
    190             httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);
     190            httpServletResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "The logged-in user cannot read the annotation.");
    191191            return null;
    192192        }
     
    209209            return result + " annotation(s) deleted.";
    210210        } else {
    211             httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);
     211            httpServletResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "The logged-in user cannot delete the annotation. Only the owner can delete the annotation.");
    212212            return null;
    213213        }
Note: See TracChangeset for help on using the changeset viewer.