Skip to content

Commit

Permalink
Allow requesting admin to approve deletion if requestor is only activ…
Browse files Browse the repository at this point in the history
…e admin at institution. https://trello.com/c/nIeyQsSA
  • Loading branch information
diamondap committed Apr 29, 2024
1 parent b8435c2 commit b3901d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pgmodels/deletion_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 210,8 @@ func (request *DeletionRequest) validateConfirmedBy(errors map[string]string) {
return
}
}
instAdmins, err := UserSelect(NewQuery().Where("institution_id", "=", request.ConfirmedBy.InstitutionID).Where("role", "=", constants.RoleInstAdmin))
query := NewQuery().Where("institution_id", "=", request.ConfirmedBy.InstitutionID).Where("role", "=", constants.RoleInstAdmin).IsNull("deactivated_at")
instAdmins, err := UserSelect(query)
if err != nil {
errors["ConfirmedByID"] = ErrDeletionBadQuery
return
Expand Down

0 comments on commit b3901d9

Please sign in to comment.