Temporarily use the field's private flag for sensitive data collection
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user