diff --git a/compose/rest/data_privacy.go b/compose/rest/data_privacy.go index 19adf7c89..0a5fffb14 100644 --- a/compose/rest/data_privacy.go +++ b/compose/rest/data_privacy.go @@ -64,14 +64,18 @@ func (ctrl *DataPrivacy) ListSensitiveData(ctx context.Context, r *request.DataP return nil, err } for _, m := range modules { - if m.Privacy.SensitivityLevel == 0 { - continue - } + // @todo ignoring this for now; revert after dev release + // if m.Privacy.SensitivityLevel == 0 { + // continue + // } sData, err := ctrl.record.FindSensitive(ctx, types.RecordFilter{ModuleID: m.ID, NamespaceID: m.NamespaceID}) if err != nil { return nil, err } + if len(sData) == 0 { + continue + } nsMod := &sensitiveDataPayload{ NamespaceID: n.ID, diff --git a/compose/service/record.go b/compose/service/record.go index ea1093d29..865ad99d6 100644 --- a/compose/service/record.go +++ b/compose/service/record.go @@ -360,7 +360,7 @@ func (svc record) FindSensitive(ctx context.Context, filter types.RecordFilter) for _, f := range m.Fields { // Skip the ones with no privacy // @todo allow the request to specify what level we wish to see - if f.Privacy.SensitivityLevel == 0 { + if !f.Private { continue }