diff --git a/src/main/java/edu/harvard/mcz/imagecapture/entity/Specimen.java b/src/main/java/edu/harvard/mcz/imagecapture/entity/Specimen.java index 47e119d..a55a596 100644 --- a/src/main/java/edu/harvard/mcz/imagecapture/entity/Specimen.java +++ b/src/main/java/edu/harvard/mcz/imagecapture/entity/Specimen.java @@ -225,11 +225,17 @@ public Boolean isExported() { } public Boolean isEditable(Users user) { - return !this.isExported(); + boolean canEdit = !this.isExported(); + if (user != null) { + canEdit = canEdit && (user.isUserRole(Users.ROLE_FULL) || user.isUserRole(Users.ROLE_ADMINISTRATOR) || this.getTypeStatus() != WorkFlowStatus.STAGE_CLEAN); + } else { + canEdit = canEdit && this.getTypeStatus() != WorkFlowStatus.STAGE_CLEAN; + } + return canEdit; } public Boolean isEditable() { - return this.isEditable(null); + return this.isEditable(Singleton.getSingletonInstance().getUser()); } public String getPrimaryDivisonISO() { diff --git a/src/main/java/edu/harvard/mcz/imagecapture/entity/fixed/WorkFlowStatus.java b/src/main/java/edu/harvard/mcz/imagecapture/entity/fixed/WorkFlowStatus.java index 99fb1fc..50afb94 100644 --- a/src/main/java/edu/harvard/mcz/imagecapture/entity/fixed/WorkFlowStatus.java +++ b/src/main/java/edu/harvard/mcz/imagecapture/entity/fixed/WorkFlowStatus.java @@ -75,6 +75,7 @@ public class WorkFlowStatus { /** * State change for a specimen record indicating that the specimen record that * has been reviewed by a taxonomist. + * Record is now only editable by Admins. */ public static final String STAGE_CLEAN = "Specialist Reviewed"; diff --git a/src/main/java/edu/harvard/mcz/imagecapture/ui/frame/MainFrame.java b/src/main/java/edu/harvard/mcz/imagecapture/ui/frame/MainFrame.java index 1dfef3b..30cf0d4 100644 --- a/src/main/java/edu/harvard/mcz/imagecapture/ui/frame/MainFrame.java +++ b/src/main/java/edu/harvard/mcz/imagecapture/ui/frame/MainFrame.java @@ -1168,6 +1168,11 @@ private JMenu getJMenuData() { return jMenuData; } + /** + * This method initializes the menu item for batch updates + * + * @return + */ private JMenuItem getJMenuItemBatchUpdate() { if (jMenuItemBatchUpdate == null) { jMenuItemBatchUpdate = new JMenuItem("Batch Update");