Skip to content

Commit

Permalink
fixed cannot demote single record
Browse files Browse the repository at this point in the history
  • Loading branch information
SteRiccio committed Aug 22, 2024
1 parent e7b66c4 commit 1e35c5b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion collect-webapp/frontend/src/model/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,12 @@ export default class User extends Serializable {
const prevStep = Workflow.getPrevStep(recordStep)
if (!prevStep) return false

return this.canEditRecord({ record, userInGroupRole: roleInGroup })
switch (recordStep) {
case Workflow.STEPS.analysis:
return this._hasAtLeastRole(User.ROLE.ANALYSIS)
default:
return this.canEditRecord({ record, roleInGroup })
}
}

canPromoteRecordWithErrors(roleInSurveyGroup) {
Expand Down

0 comments on commit 1e35c5b

Please sign in to comment.