Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f953685
feature: GESDISC management approval step
joncarlson Apr 4, 2024
1990bee
Updating Upload Questions
ckd002 Apr 8, 2024
45e2b5f
EDPUB-1242: Allow users to edit their user profile
acharya-deepak Apr 12, 2024
541c374
Fixed the space issue
acharya-deepak Apr 12, 2024
24130de
Revert "Updating Upload Questions"
ckd002 Apr 15, 2024
1c689f4
seed changes for upload questions
ckd002 Apr 15, 2024
c80e1e8
EDPUB-1262: seed.sql changes for datetimepicker
acharya-deepak Apr 18, 2024
6d011c2
Update 7-seed.sql
acharya-deepak Apr 18, 2024
6ab6bf6
feature: add new management approval step to updates SQL
joncarlson Apr 18, 2024
4237626
EDPUB-1263: Adding new previlage restrictions to submission review
acharya-deepak Apr 23, 2024
1d24e05
EDPUB-1263: fixed test cases
acharya-deepak Apr 23, 2024
3b91da5
EDPUB-1263: test case fix
acharya-deepak Apr 23, 2024
8200e9e
Clear attributes from input object once used
camposeddie Apr 23, 2024
0264a7d
Add mapper for extra responses
camposeddie Apr 23, 2024
5b8c49d
Update changelog
camposeddie Apr 23, 2024
5952123
Resolving conflicts
deepakacharyab Apr 25, 2024
5e2bbfd
EDPUB-1244: Update example workflow name from mEditor to MMT
acharya-deepak Apr 25, 2024
a4af3ca
Decode diret message in email notification
camposeddie Apr 25, 2024
c9e5616
Add changelog
camposeddie Apr 25, 2024
ea872d7
Resolving merge conflicts for EDPUB-1244
deepakacharyab Apr 25, 2024
95a3edc
Merge pull request #52 from eosdis-nasa/GUUI-3292-gesdisc-management-…
DavisGauntUAH Apr 26, 2024
580ab9a
Merge pull request #53 from eosdis-nasa/EDPUB-1242
DavisGauntUAH Apr 26, 2024
3e77cca
Merge pull request #60 from eosdis-nasa/EDPUB-1246-fix-special-char-i…
DavisGauntUAH Apr 26, 2024
c6a87d9
Resolve merge conlficts
camposeddie Apr 26, 2024
1f879b1
Merge pull request #58 from eosdis-nasa/EDPUB-1260-metadata-mapper-ma…
DavisGauntUAH Apr 26, 2024
686d9ab
Resolving merge conflicts EDPUB-1263
deepakacharyab Apr 26, 2024
6845076
Merge pull request #59 from eosdis-nasa/EDPUB-1263
DavisGauntUAH Apr 26, 2024
9276189
Resolving merge conflicts EDPUB-1244
deepakacharyab Apr 26, 2024
b7fc524
Merge pull request #61 from eosdis-nasa/EDPUB-1244
DavisGauntUAH Apr 26, 2024
b720879
Fix privilage check for approval
DavisGauntUAH Apr 29, 2024
811eb98
Fix privilage check for approval
DavisGauntUAH Apr 29, 2024
bcf3b55
Fix privilage check for approval
DavisGauntUAH Apr 29, 2024
d7e8477
Merge pull request #62 from eosdis-nasa/hotfix-approve-privilage-fix
DavisGauntUAH Apr 29, 2024
e96b3c3
Merge branch 'develop' into EDPUB-1215-sample-file-upload-questions
DavisGauntUAH May 2, 2024
fdcbc9c
Merge pull request #56 from eosdis-nasa/EDPUB-1215-sample-file-upload…
DavisGauntUAH May 2, 2024
a9ea4cb
Merge pull request #66 from eosdis-nasa/develop
DavisGauntUAH May 2, 2024
08e07f9
Adding support for ORNL push metadata in UAT
DavisGauntUAH May 9, 2024
6a28a58
Merge pull request #73 from eosdis-nasa/ORNL-push-metadata-hotfix
DavisGauntUAH May 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## Unreleased

<!-- Unreleased changes can be added here. -->
- Updated metadata mapper for DAAC specific questions
- Updated email notification text formatting to accommodate special characters
- Updated contact information label to full name from first and last name
- Renames improperly named /api/data/submission/{operation} endpoints back to the intended /api/submission/{operation}.
- Add DAAC onboard/offboard endpoints
Expand Down
41 changes: 22 additions & 19 deletions src/nodejs/lambda-handlers/submission.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,28 +148,31 @@ async function submitMethod(event, user) {
}

async function reviewMethod(event, user) {
const approvedUserPrivileges = ['ADMIN', 'REQUEST_REVIEW', 'REQUEST_REVIEW_MANAGER'];
const { id, approve } = event;
const status = await db.submission.getState({ id });
const stepType = status.step.type;
let eventType;
if (approve === 'false' || !approve) {
eventType = 'review_rejected';
} else if (stepType === 'review') {
eventType = 'review_approved';
} else {
eventType = 'workflow_promote_step';
if (user.user_privileges.some((privilege) => approvedUserPrivileges.includes(privilege))) {
const stepType = status.step.type;
let eventType;
if (approve === 'false' || !approve) {
eventType = 'review_rejected';
} else if (stepType === 'review') {
eventType = 'review_approved';
} else {
eventType = 'workflow_promote_step';
}
const eventMessage = {
event_type: eventType,
submission_id: id,
conversation_id: status.conversation_id,
workflow_id: status.workflow_id,
user_id: user.id,
data: status.step.data,
step_name: status.step_name
};
if (status.step.step_message) eventMessage.step_message = status.step.step_message;
await msg.sendEvent(eventMessage);
}
const eventMessage = {
event_type: eventType,
submission_id: id,
conversation_id: status.conversation_id,
workflow_id: status.workflow_id,
user_id: user.id,
data: status.step.data,
step_name: status.step_name
};
if (status.step.step_message) eventMessage.step_message = status.step.step_message;
await msg.sendEvent(eventMessage);
return status;
}

Expand Down
Loading