Project

General

Profile

« Previous | Next » 

Revision 6777

updated D1 API -- removed Permission.REPLICATE and associated parameters

View differences:

CNResourceHandler.java
1066 1066
        boolean result = false;
1067 1067
        Subject targetNodeSubject = new Subject();
1068 1068
        String nodeSubject = null;
1069
        Permission permission = null;
1070 1069
        String replPermission = null;
1071 1070

  
1072 1071
        // get the pid
......
1085 1084

  
1086 1085
        }
1087 1086

  
1088
        // get the permission
1089
        try {
1090
            replPermission = params.get("replicatePermission")[0];
1091
            permission = Permission.convert(replPermission);
1087
        result = CNodeService.getInstance(request).isNodeAuthorized(session, targetNodeSubject, identifier);
1092 1088

  
1093
        } catch (NullPointerException e) {
1094
            String msg = "The 'replicatePermission' must be provided as a parameter and was not.";
1095
            logMetacat.error(msg);
1096
            throw new InvalidRequest("4873", msg);
1097

  
1098
        }
1099

  
1100
        result = CNodeService.getInstance(request).isNodeAuthorized(session,
1101
                targetNodeSubject, identifier, permission);
1102

  
1103 1089
        response.setStatus(200);
1104 1090
        response.setContentType("text/xml");
1105 1091
        return result;

Also available in: Unified diff