Skip to content

Commit

Permalink
Fix #256 Support storage location configiration on v1 data agreement
Browse files Browse the repository at this point in the history
  • Loading branch information
albinpa authored and georgepadayatti committed Oct 16, 2023
1 parent 075ded8 commit 574c032
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/org/organizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ type Purpose struct {
CloudAgentDataAgreementId string
Version string
PublishFlag bool
StorageLocation string
}

// DataRetention data retention configuration
Expand Down
13 changes: 8 additions & 5 deletions src/v1/handler/organization_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ type purpose struct {
Shared3PP bool
SSIID string
PublishFlag bool
StorageLocation string
}

type purposeReq struct {
Expand Down Expand Up @@ -638,11 +639,12 @@ func AddConsentPurposes(w http.ResponseWriter, r *http.Request) {
DPIADate: p.DPIA.DPIADate,
DPIASummaryUrl: p.DPIA.DPIASummaryUrl,
},
DataRetention: p.DataRetention,
Restriction: p.Restriction,
Shared3PP: p.Shared3PP,
SSIID: p.SSIID,
PublishFlag: p.PublishFlag,
DataRetention: p.DataRetention,
Restriction: p.Restriction,
Shared3PP: p.Shared3PP,
SSIID: p.SSIID,
PublishFlag: p.PublishFlag,
StorageLocation: p.StorageLocation,
}

o.Purposes = append(o.Purposes, tempPurpose)
Expand Down Expand Up @@ -780,6 +782,7 @@ func UpdatePurposeByID(w http.ResponseWriter, r *http.Request) {
o.Purposes[i].Restriction = uReq.Restriction
o.Purposes[i].Shared3PP = uReq.Shared3PP
o.Purposes[i].PublishFlag = uReq.PublishFlag
o.Purposes[i].StorageLocation = uReq.StorageLocation
if (o.Purposes[i].AttributeType != uReq.AttributeType) ||
(o.Purposes[i].SSIID != uReq.SSIID) {
m := fmt.Sprintf("Can not modify attributeType or SSIID for purpose: %v organization: %v",
Expand Down

0 comments on commit 574c032

Please sign in to comment.