diff --git a/nunaliit2-couch-submission/src/main/java/ca/carleton/gcrc/couch/submission/impl/SubmissionRobotThread.java b/nunaliit2-couch-submission/src/main/java/ca/carleton/gcrc/couch/submission/impl/SubmissionRobotThread.java index aa8c1ad35..54b7aaded 100644 --- a/nunaliit2-couch-submission/src/main/java/ca/carleton/gcrc/couch/submission/impl/SubmissionRobotThread.java +++ b/nunaliit2-couch-submission/src/main/java/ca/carleton/gcrc/couch/submission/impl/SubmissionRobotThread.java @@ -251,6 +251,14 @@ public void performSubmittedWork(JSONObject submissionDoc, JSONObject currentDoc } JSONObject submittedDoc = submissionInfo.optJSONObject("submitted_doc"); + String submitterName = submissionInfo.optString("submitter_name"); + String docOwner = null; + if( null != submittedDoc ){ + JSONObject nunaliitCreated = submittedDoc.optJSONObject("nunaliit_created"); + if (null != nunaliitCreated) { + docOwner = nunaliitCreated.getString("name"); + } + } JSONArray nunaliitLayers = null; if( null != submittedDoc ){ nunaliitLayers = submittedDoc.optJSONArray("nunaliit_layers"); @@ -281,6 +289,7 @@ public void performSubmittedWork(JSONObject submissionDoc, JSONObject currentDoc if( !approved ){ boolean atLeastOneLayer = false; boolean allLayerRoles = true; + boolean onPublicLayerAndIsDocOwner = false; if( null != nunaliitLayers ){ for(int i=0;i roles, String layerId){ boolean haveAccess = false;