diff --git a/src/org/labkey/snd/security/roles/SNDBasicSubmitterRole.java b/src/org/labkey/snd/security/roles/SNDBasicSubmitterRole.java index 034ace3b..e1ec4c17 100644 --- a/src/org/labkey/snd/security/roles/SNDBasicSubmitterRole.java +++ b/src/org/labkey/snd/security/roles/SNDBasicSubmitterRole.java @@ -21,6 +21,10 @@ import org.labkey.api.security.roles.AbstractModuleScopedRole; import org.labkey.api.snd.Category; import org.labkey.snd.SNDModule; +import org.labkey.snd.security.permissions.SNDCompletedDeletePermission; +import org.labkey.snd.security.permissions.SNDCompletedInsertPermission; +import org.labkey.snd.security.permissions.SNDCompletedReadPermission; +import org.labkey.snd.security.permissions.SNDCompletedUpdatePermission; import org.labkey.snd.security.permissions.SNDInProgressDeletePermission; import org.labkey.snd.security.permissions.SNDInProgressInsertPermission; import org.labkey.snd.security.permissions.SNDInProgressReadPermission; @@ -42,7 +46,11 @@ public SNDBasicSubmitterRole() SNDInProgressUpdatePermission.class, SNDInProgressDeletePermission.class, SNDReviewRequiredReadPermission.class, SNDReviewRequiredInsertPermission.class, SNDReviewRequiredUpdatePermission.class, SNDReviewRequiredDeletePermission.class, - SNDRejectedReadPermission.class, SNDRejectedDeletePermission.class); + SNDRejectedReadPermission.class, SNDRejectedDeletePermission.class, + // allow basic submitters to read, update, insert, and delete completed data + // This is needed uptil SNPRC releases the new QC workflow + SNDCompletedInsertPermission.class, SNDCompletedDeletePermission.class, + SNDCompletedReadPermission.class, SNDCompletedUpdatePermission.class); } @Override diff --git a/webapp/snd/test/tests.js b/webapp/snd/test/tests.js index c1e22c28..e5fa1ecf 100644 --- a/webapp/snd/test/tests.js +++ b/webapp/snd/test/tests.js @@ -591,24 +591,27 @@ } } } - },{ - - name: 'Get Event: Invalid permission. Basic submitter reading completed data.', - roles: ['org.labkey.api.security.roles.ReaderRole', - 'org.labkey.api.security.roles.EditorRole', - 'org.labkey.snd.security.roles.SNDBasicSubmitterRole'], - run : function() - { - return{ - request:{ - url:LABKEY.SND_TEST_URLS.GET_EVENT_URL, - jsonData:{"eventId": "1800002"} - }, - expectedFailure : 'You do not have permission to Read event data for QC state Completed for these super packages.' - } - } - },{ - + }, + //{ + // // This test is commented out because it is not currently valid: + // // allow basic submitters to read, update, insert, and delete completed data + // // This is needed uptil SNPRC releases the new QC workflow + // name: 'Get Event: Invalid permission. Basic submitter reading completed data.', + // roles: ['org.labkey.api.security.roles.ReaderRole', + // 'org.labkey.api.security.roles.EditorRole', + // 'org.labkey.snd.security.roles.SNDBasicSubmitterRole'], + // run : function() + // { + // return{ + // request:{ + // url:LABKEY.SND_TEST_URLS.GET_EVENT_URL, + // jsonData:{"eventId": "1800002"} + // }, + // expectedFailure : 'You do not have permission to Read event data for QC state Completed for these super packages.' + // } + // } + // }, + { name: 'Get Event: Valid permission. Data reviewer reading completed data.', roles: ['org.labkey.api.security.roles.ReaderRole', 'org.labkey.api.security.roles.EditorRole', @@ -657,29 +660,34 @@ } } } - }, { - - name: 'Delete Event: Invalid permission. Basic submitter role cannot delete completed data.', - roles: ['org.labkey.api.security.roles.ReaderRole', - 'org.labkey.api.security.roles.EditorRole', - 'org.labkey.snd.security.roles.SNDBasicSubmitterRole'], - run : function() - { - return{ - request:{ - url:LABKEY.SND_TEST_URLS.DELETE_EVENT_URL, - jsonData: { - schemaName: 'snd', - queryName: 'Events', - rows: [{ - EventId: 1800002 - }] - } - }, - expectedFailure : 'You do not have permission to Delete event data for QC state Completed for these super packages.' - } - } - },{ + }, + // // This test is commented out because it is not currently valid: + // // allow basic submitters to read, update, insert, and delete completed data + // // This is needed uptil SNPRC releases the new QC workflow + // { + // + // name: 'Delete Event: Invalid permission. Basic submitter role cannot delete completed data.', + // roles: ['org.labkey.api.security.roles.ReaderRole', + // 'org.labkey.api.security.roles.EditorRole', + // 'org.labkey.snd.security.roles.SNDBasicSubmitterRole'], + // run : function() + // { + // return{ + // request:{ + // url:LABKEY.SND_TEST_URLS.DELETE_EVENT_URL, + // jsonData: { + // schemaName: 'snd', + // queryName: 'Events', + // rows: [{ + // EventId: 1800002 + // }] + // } + // }, + // expectedFailure : 'You do not have permission to Delete event data for QC state Completed for these super packages.' + // } + // } + // }, + { name: 'Delete Event: Correct permission. Data admin role.', roles: ['org.labkey.api.security.roles.ReaderRole',