From e777733fc22a04e50ccab2e46066d54dbe79f03a Mon Sep 17 00:00:00 2001 From: SergiuPacurariu Date: Wed, 30 Oct 2024 12:57:16 +0200 Subject: [PATCH] #13093 - Update Data Protection for certain Data Fields - fix issues on Android app --- .../sormas/app/campaign/edit/CampaignFormMetaDialog.java | 3 ++- .../de/symeda/sormas/app/caze/edit/CaseEditFragment.java | 2 +- .../app/caze/edit/CaseEditHealthConditionsFragment.java | 2 +- .../app/caze/edit/CaseEditHospitalizationFragment.java | 3 ++- .../app/caze/edit/CaseEditMaternalHistoryFragment.java | 3 ++- .../app/caze/edit/PreviousHospitalizationDialog.java | 3 ++- .../de/symeda/sormas/app/caze/read/CaseReadFragment.java | 2 +- .../app/caze/read/CaseReadHospitalizationFragment.java | 3 ++- .../clinicalcourse/edit/ClinicalVisitEditFragment.java | 3 ++- .../sormas/app/contact/edit/ContactEditFragment.java | 2 +- .../app/environment/read/EnvironmentReadFragment.java | 2 +- .../edit/EnvironmentSampleEditFragment.java | 2 +- .../symeda/sormas/app/epidata/ActivityAsCaseDialog.java | 2 +- .../app/epidata/EpidemiologicalDataEditFragment.java | 3 ++- .../app/epidata/EpidemiologicalDataReadFragment.java | 8 ++++---- .../java/de/symeda/sormas/app/epidata/ExposureDialog.java | 2 +- .../symeda/sormas/app/event/edit/EventEditFragment.java | 2 +- .../edit/EventParticipantEditFragment.java | 3 ++- .../read/EventParticipantReadFragment.java | 3 ++- .../symeda/sormas/app/event/read/EventReadFragment.java | 2 +- .../app/immunization/edit/ImmunizationEditFragment.java | 2 +- .../app/immunization/read/ImmunizationReadFragment.java | 2 +- .../immunization/vaccination/VaccinationEditFragment.java | 2 +- .../VaccinationEditHealthConditionsFragment.java | 2 +- .../app/pathogentest/edit/PathogenTestEditFragment.java | 2 +- .../app/pathogentest/read/PathogenTestReadFragment.java | 2 +- .../symeda/sormas/app/person/edit/PersonEditFragment.java | 8 ++++---- .../symeda/sormas/app/person/read/PersonReadFragment.java | 8 ++++---- .../symeda/sormas/app/sample/edit/SampleEditFragment.java | 2 +- .../symeda/sormas/app/symptoms/SymptomsEditFragment.java | 4 ++-- .../sormas/app/therapy/edit/PrescriptionEditFragment.java | 2 +- .../sormas/app/therapy/edit/TreatmentEditFragment.java | 3 ++- .../symeda/sormas/app/visit/edit/VisitEditFragment.java | 3 ++- 33 files changed, 54 insertions(+), 43 deletions(-) diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/campaign/edit/CampaignFormMetaDialog.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/campaign/edit/CampaignFormMetaDialog.java index 29673179c3b..27e92f75b31 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/campaign/edit/CampaignFormMetaDialog.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/campaign/edit/CampaignFormMetaDialog.java @@ -30,6 +30,7 @@ import de.symeda.sormas.app.R; import de.symeda.sormas.app.backend.campaign.Campaign; import de.symeda.sormas.app.backend.campaign.form.CampaignFormMeta; +import de.symeda.sormas.app.backend.config.ConfigProvider; import de.symeda.sormas.app.component.dialog.FormDialog; import de.symeda.sormas.app.component.validation.FragmentValidator; import de.symeda.sormas.app.core.notification.NotificationHelper; @@ -51,7 +52,7 @@ public CampaignFormMetaDialog(final FragmentActivity activity, Campaign campaign R.layout.dialog_root_two_button_panel_layout, R.string.heading_campaign_form_meta_select, -1, - UiFieldAccessCheckers.forSensitiveData(campaign.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(campaign.isPseudonymized(), ConfigProvider.getServerCountryCode())); this.campaign = campaign; } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java index a745274ebc9..7824dbb0fb1 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java @@ -130,7 +130,7 @@ public static CaseEditFragment newInstance(Case activityRootData) { activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()) .add(new CountryFieldVisibilityChecker(ConfigProvider.getServerLocale())), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); caseEditFragment.differentPlaceOfStayJurisdiction = activityRootData.getRegion() != null || activityRootData.getDistrict() != null || activityRootData.getCommunity() != null; diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHealthConditionsFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHealthConditionsFragment.java index ce6f13e5bfa..3e44e0f4300 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHealthConditionsFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHealthConditionsFragment.java @@ -33,7 +33,7 @@ public static CaseEditHealthConditionsFragment newInstance(Case activityRootData activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()) .add(new CountryFieldVisibilityChecker(ConfigProvider.getServerLocale())), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } @Override diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHospitalizationFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHospitalizationFragment.java index 40412340395..4b6aa3afcb1 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHospitalizationFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHospitalizationFragment.java @@ -33,6 +33,7 @@ import de.symeda.sormas.app.R; import de.symeda.sormas.app.backend.caze.Case; import de.symeda.sormas.app.backend.common.DatabaseHelper; +import de.symeda.sormas.app.backend.config.ConfigProvider; import de.symeda.sormas.app.backend.hospitalization.Hospitalization; import de.symeda.sormas.app.backend.hospitalization.PreviousHospitalization; import de.symeda.sormas.app.component.Item; @@ -57,7 +58,7 @@ public static CaseEditHospitalizationFragment newInstance(Case activityRootData) null, activityRootData, new FieldVisibilityCheckers(), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } // Instance methods diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditMaternalHistoryFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditMaternalHistoryFragment.java index 68fdfac57af..da101799ed6 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditMaternalHistoryFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditMaternalHistoryFragment.java @@ -25,6 +25,7 @@ import de.symeda.sormas.app.R; import de.symeda.sormas.app.backend.caze.Case; import de.symeda.sormas.app.backend.caze.maternalhistory.MaternalHistory; +import de.symeda.sormas.app.backend.config.ConfigProvider; import de.symeda.sormas.app.component.Item; import de.symeda.sormas.app.databinding.FragmentCaseEditMaternalHistoryLayoutBinding; import de.symeda.sormas.app.util.InfrastructureDaoHelper; @@ -44,7 +45,7 @@ public static CaseEditMaternalHistoryFragment newInstance(Case activityRootData) null, activityRootData, null, - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } // Overrides diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/PreviousHospitalizationDialog.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/PreviousHospitalizationDialog.java index e7eba2bdd69..affbc8e7b06 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/PreviousHospitalizationDialog.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/PreviousHospitalizationDialog.java @@ -30,6 +30,7 @@ import de.symeda.sormas.api.utils.ValidationException; import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; import de.symeda.sormas.app.R; +import de.symeda.sormas.app.backend.config.ConfigProvider; import de.symeda.sormas.app.backend.hospitalization.PreviousHospitalization; import de.symeda.sormas.app.backend.infrastructure.InfrastructureHelper; import de.symeda.sormas.app.component.Item; @@ -60,7 +61,7 @@ public class PreviousHospitalizationDialog extends FormDialog { R.layout.dialog_root_three_button_panel_layout, R.string.heading_previous_hospitalization, -1, - UiFieldAccessCheckers.forSensitiveData(previousHospitalization.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(previousHospitalization.isPseudonymized(), ConfigProvider.getServerCountryCode())); this.data = previousHospitalization; diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java index 077d9d9aaa3..4bd14c8f7d8 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java @@ -61,7 +61,7 @@ public static CaseReadFragment newInstance(Case activityRootData) { activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()) .add(new CountryFieldVisibilityChecker(ConfigProvider.getServerLocale())), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); return caseReadFragment; } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadHospitalizationFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadHospitalizationFragment.java index 4564ed6e324..979c4da09d7 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadHospitalizationFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadHospitalizationFragment.java @@ -28,6 +28,7 @@ import de.symeda.sormas.app.BaseReadFragment; import de.symeda.sormas.app.R; import de.symeda.sormas.app.backend.caze.Case; +import de.symeda.sormas.app.backend.config.ConfigProvider; import de.symeda.sormas.app.backend.hospitalization.Hospitalization; import de.symeda.sormas.app.backend.hospitalization.PreviousHospitalization; import de.symeda.sormas.app.databinding.FragmentCaseReadHospitalizationLayoutBinding; @@ -48,7 +49,7 @@ public static CaseReadHospitalizationFragment newInstance(Case activityRootData) null, activityRootData, new FieldVisibilityCheckers(), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } // Overrides diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/clinicalcourse/edit/ClinicalVisitEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/clinicalcourse/edit/ClinicalVisitEditFragment.java index 08890964398..14f2cdd48d9 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/clinicalcourse/edit/ClinicalVisitEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/clinicalcourse/edit/ClinicalVisitEditFragment.java @@ -20,6 +20,7 @@ import de.symeda.sormas.app.BaseEditFragment; import de.symeda.sormas.app.R; import de.symeda.sormas.app.backend.clinicalcourse.ClinicalVisit; +import de.symeda.sormas.app.backend.config.ConfigProvider; import de.symeda.sormas.app.databinding.FragmentClinicalVisitEditLayoutBinding; public class ClinicalVisitEditFragment extends BaseEditFragment { @@ -32,7 +33,7 @@ public static ClinicalVisitEditFragment newInstance(ClinicalVisit activityRootDa null, activityRootData, null, - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } @Override diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactEditFragment.java index aa7562c8386..25cc150e405 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactEditFragment.java @@ -85,7 +85,7 @@ public static ContactEditFragment newInstance(Contact activityRootData) { activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()) .add(new CountryFieldVisibilityChecker(ConfigProvider.getServerLocale())), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } private void setUpControlListeners(FragmentContactEditLayoutBinding contentBinding) { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/environment/read/EnvironmentReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/environment/read/EnvironmentReadFragment.java index e867e084bf2..2b8552be226 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/environment/read/EnvironmentReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/environment/read/EnvironmentReadFragment.java @@ -27,7 +27,7 @@ public static EnvironmentReadFragment newInstance(Environment activityRootData) null, activityRootData, FieldVisibilityCheckers.getNoop(), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); return environmentReadFragment; } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/environmentsample/edit/EnvironmentSampleEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/environmentsample/edit/EnvironmentSampleEditFragment.java index 43962036f0a..62779c16cfe 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/environmentsample/edit/EnvironmentSampleEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/environmentsample/edit/EnvironmentSampleEditFragment.java @@ -68,7 +68,7 @@ public static EnvironmentSampleEditFragment newInstance(EnvironmentSample activi null, activityRootData, FieldVisibilityCheckers.withCountry(ConfigProvider.getServerCountryCode()), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized()), + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode()), UserRight.ENVIRONMENT_SAMPLE_EDIT); } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/ActivityAsCaseDialog.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/ActivityAsCaseDialog.java index b8cad52e02e..3677e6d4042 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/ActivityAsCaseDialog.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/ActivityAsCaseDialog.java @@ -60,7 +60,7 @@ public class ActivityAsCaseDialog extends FormDialog { R.string.heading_activityAsCase, -1, false, - UiFieldAccessCheckers.forSensitiveData(activityAsCase.isPseudonymized()), + UiFieldAccessCheckers.forSensitiveData(activityAsCase.isPseudonymized(), ConfigProvider.getServerCountryCode()), FieldVisibilityCheckers.withDisease(getDiseaseOfCaseOrContact(activityRootData)).andWithCountry(ConfigProvider.getServerCountryCode())); this.data = activityAsCase; diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataEditFragment.java index d07c6db21d6..c4a422a7db1 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataEditFragment.java @@ -41,6 +41,7 @@ import de.symeda.sormas.app.backend.caze.Case; import de.symeda.sormas.app.backend.common.DatabaseHelper; import de.symeda.sormas.app.backend.common.PseudonymizableAdo; +import de.symeda.sormas.app.backend.config.ConfigProvider; import de.symeda.sormas.app.backend.contact.Contact; import de.symeda.sormas.app.backend.epidata.EpiData; import de.symeda.sormas.app.backend.exposure.Exposure; @@ -65,7 +66,7 @@ public static EpidemiologicalDataEditFragment newInstance(PseudonymizableAdo act null, activityRootData, FieldVisibilityCheckers.withDisease(getDiseaseOfCaseOrContact(activityRootData)), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } private void setUpControlListeners(final FragmentEditEpidLayoutBinding contentBinding) { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataReadFragment.java index bf56e2d4d13..8dd77dc8803 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataReadFragment.java @@ -69,7 +69,7 @@ public static EpidemiologicalDataReadFragment newInstance(Case activityRootData) null, activityRootData, FieldVisibilityCheckers.withDisease(getDiseaseOfCaseOrContact(activityRootData)).andWithCountry(ConfigProvider.getServerCountryCode()), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } public static EpidemiologicalDataReadFragment newInstance(Contact activityRootData) { @@ -78,7 +78,7 @@ public static EpidemiologicalDataReadFragment newInstance(Contact activityRootDa null, activityRootData, FieldVisibilityCheckers.withDisease(getDiseaseOfCaseOrContact(activityRootData)).andWithCountry(ConfigProvider.getServerCountryCode()), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } private void setUpControlListeners() { @@ -107,7 +107,7 @@ private void setUpControlListeners() { ExposureDto.class, (ViewGroup) infoDialog.getBinding().getRoot(), FieldVisibilityCheckers.withDisease(getDiseaseOfCaseOrContact(getActivityRootData())), - UiFieldAccessCheckers.forSensitiveData(((PseudonymizableAdo) getActivityRootData()).isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(((PseudonymizableAdo) getActivityRootData()).isPseudonymized(), ConfigProvider.getServerCountryCode())); infoDialog.show(); }; @@ -141,7 +141,7 @@ private void setUpControlListeners() { (ViewGroup) infoDialog.getBinding().getRoot(), FieldVisibilityCheckers.withDisease(getDiseaseOfCaseOrContact(getActivityRootData())) .andWithCountry(ConfigProvider.getServerCountryCode()), - UiFieldAccessCheckers.forSensitiveData(((PseudonymizableAdo) getActivityRootData()).isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(((PseudonymizableAdo) getActivityRootData()).isPseudonymized(), ConfigProvider.getServerCountryCode())); infoDialog.show(); }; diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/ExposureDialog.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/ExposureDialog.java index b7125090159..69e91abd80c 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/ExposureDialog.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/ExposureDialog.java @@ -58,7 +58,7 @@ public class ExposureDialog extends FormDialog { R.string.heading_exposure, -1, false, - UiFieldAccessCheckers.forSensitiveData(exposure.isPseudonymized()), + UiFieldAccessCheckers.forSensitiveData(exposure.isPseudonymized(), ConfigProvider.getServerCountryCode()), FieldVisibilityCheckers.withDisease(getDiseaseOfCaseOrContact(activityRootData)).andWithCountry(ConfigProvider.getServerCountryCode())); this.data = exposure; diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/event/edit/EventEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/event/edit/EventEditFragment.java index 846c622e9db..cb4c79e2c80 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/event/edit/EventEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/event/edit/EventEditFragment.java @@ -101,7 +101,7 @@ public static EventEditFragment newInstance(Event activityRootData) { null, activityRootData, FieldVisibilityCheckers.withCountry(ConfigProvider.getServerCountryCode()), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); fragment.isMultiDayEvent = activityRootData.getEndDate() != null; diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/event/eventparticipant/edit/EventParticipantEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/event/eventparticipant/edit/EventParticipantEditFragment.java index 9e501d2d93d..8843394a6a0 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/event/eventparticipant/edit/EventParticipantEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/event/eventparticipant/edit/EventParticipantEditFragment.java @@ -27,6 +27,7 @@ import de.symeda.sormas.app.BaseEditFragment; import de.symeda.sormas.app.R; import de.symeda.sormas.app.backend.common.DatabaseHelper; +import de.symeda.sormas.app.backend.config.ConfigProvider; import de.symeda.sormas.app.backend.event.EventParticipant; import de.symeda.sormas.app.backend.location.Location; import de.symeda.sormas.app.caze.edit.CaseNewActivity; @@ -50,7 +51,7 @@ public static EventParticipantEditFragment newInstance(EventParticipant activity null, activityRootData, new FieldVisibilityCheckers(), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } // Instance methods diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/event/eventparticipant/read/EventParticipantReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/event/eventparticipant/read/EventParticipantReadFragment.java index 81c805acd9c..310496bb817 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/event/eventparticipant/read/EventParticipantReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/event/eventparticipant/read/EventParticipantReadFragment.java @@ -25,6 +25,7 @@ import de.symeda.sormas.app.BaseReadFragment; import de.symeda.sormas.app.R; import de.symeda.sormas.app.backend.common.DatabaseHelper; +import de.symeda.sormas.app.backend.config.ConfigProvider; import de.symeda.sormas.app.backend.event.EventParticipant; import de.symeda.sormas.app.caze.read.CaseReadActivity; import de.symeda.sormas.app.databinding.FragmentEventParticipantReadLayoutBinding; @@ -41,7 +42,7 @@ public static EventParticipantReadFragment newInstance(EventParticipant activity null, activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getEvent().getDisease()), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } // Instance methods diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/event/read/EventReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/event/read/EventReadFragment.java index e7d2419f264..7fce89cb3de 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/event/read/EventReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/event/read/EventReadFragment.java @@ -56,7 +56,7 @@ public static EventReadFragment newInstance(Event activityRootData) { null, activityRootData, FieldVisibilityCheckers.withCountry(ConfigProvider.getServerCountryCode()), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } // Overrides diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/edit/ImmunizationEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/edit/ImmunizationEditFragment.java index 8d6c55f3ef9..3d9827e5c54 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/edit/ImmunizationEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/edit/ImmunizationEditFragment.java @@ -89,7 +89,7 @@ public static ImmunizationEditFragment newInstance(Immunization activityRootData activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()) .add(new CountryFieldVisibilityChecker(ConfigProvider.getServerLocale())), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); immunizationEditFragment.setMeansOfImmunizationChange(meansOfImmunizationChange); diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/read/ImmunizationReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/read/ImmunizationReadFragment.java index b3d0dab8cf8..c407adf7c0f 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/read/ImmunizationReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/read/ImmunizationReadFragment.java @@ -47,7 +47,7 @@ public static ImmunizationReadFragment newInstance(Immunization activityRootData activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()) .add(new CountryFieldVisibilityChecker(ConfigProvider.getServerLocale())), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); return immunizationReadFragment; } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/vaccination/VaccinationEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/vaccination/VaccinationEditFragment.java index 27bc4b6aa33..c7aa6016a3d 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/vaccination/VaccinationEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/vaccination/VaccinationEditFragment.java @@ -57,7 +57,7 @@ public static VaccinationEditFragment newInstance(Vaccination activityRootData) null, activityRootData, null, - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } @Override diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/vaccination/VaccinationEditHealthConditionsFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/vaccination/VaccinationEditHealthConditionsFragment.java index aa00912d6f5..3bfe576d255 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/vaccination/VaccinationEditHealthConditionsFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/immunization/vaccination/VaccinationEditHealthConditionsFragment.java @@ -33,7 +33,7 @@ public static VaccinationEditHealthConditionsFragment newInstance(Vaccination ac activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getImmunization().getDisease()) .add(new CountryFieldVisibilityChecker(ConfigProvider.getServerLocale())), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } @Override diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/edit/PathogenTestEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/edit/PathogenTestEditFragment.java index e090db0d7ba..007abe578d4 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/edit/PathogenTestEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/edit/PathogenTestEditFragment.java @@ -75,7 +75,7 @@ public static PathogenTestEditFragment newInstance(PathogenTest activityRootData null, activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getTestedDisease()).andWithCountry(ConfigProvider.getServerCountryCode()), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } // Overrides diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/read/PathogenTestReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/read/PathogenTestReadFragment.java index 28bece5d2cc..9a85f3ee6d3 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/read/PathogenTestReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/read/PathogenTestReadFragment.java @@ -44,7 +44,7 @@ public static PathogenTestReadFragment newInstance(PathogenTest activityRootData null, activityRootData, FieldVisibilityCheckers.withCountry(ConfigProvider.getServerCountryCode()), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } // Overrides diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java index 263e3de8287..7de84d96b90 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java @@ -101,7 +101,7 @@ public static PersonEditFragment newInstance(Case activityRootData) { activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()) .add(new CountryFieldVisibilityChecker(ConfigProvider.getServerLocale())), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } public static PersonEditFragment newInstance(Contact activityRootData) { @@ -111,7 +111,7 @@ public static PersonEditFragment newInstance(Contact activityRootData) { null, activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } public static PersonEditFragment newInstance(Immunization activityRootData) { @@ -121,7 +121,7 @@ public static PersonEditFragment newInstance(Immunization activityRootData) { null, activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } public static PersonEditFragment newInstance(EventParticipant activityRootData) { @@ -131,7 +131,7 @@ public static PersonEditFragment newInstance(EventParticipant activityRootData) null, activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getEvent().getDisease()), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } private void setUpLayoutBinding(final BaseEditFragment fragment, final Person record, final FragmentPersonEditLayoutBinding contentBinding) { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/person/read/PersonReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/person/read/PersonReadFragment.java index 7422906c113..bae6e313cb4 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/person/read/PersonReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/person/read/PersonReadFragment.java @@ -70,7 +70,7 @@ public static PersonReadFragment newInstance(Case activityRootData) { activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()) .add(new CountryFieldVisibilityChecker(ConfigProvider.getServerLocale())), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } public static PersonReadFragment newInstance(Contact activityRootData) { @@ -79,7 +79,7 @@ public static PersonReadFragment newInstance(Contact activityRootData) { null, activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } public static PersonReadFragment newInstance(Immunization activityRootData) { @@ -88,7 +88,7 @@ public static PersonReadFragment newInstance(Immunization activityRootData) { null, activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } public static PersonReadFragment newInstance(EventParticipant activityRootData) { @@ -97,7 +97,7 @@ public static PersonReadFragment newInstance(EventParticipant activityRootData) null, activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getEvent().getDisease()), - UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.getDefault(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } private void setUpControlListeners() { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/sample/edit/SampleEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/sample/edit/SampleEditFragment.java index 2c594ecf493..08d8db7b61b 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/sample/edit/SampleEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/sample/edit/SampleEditFragment.java @@ -85,7 +85,7 @@ public static SampleEditFragment newInstance(Sample activityRootData) { null, activityRootData, FieldVisibilityCheckers.withDisease(getDiseaseOfAssociatedEntity(activityRootData)).andWithCountry(ConfigProvider.getServerCountryCode()), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized()), + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode()), UserRight.SAMPLE_EDIT); } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/symptoms/SymptomsEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/symptoms/SymptomsEditFragment.java index 093b827d26f..fbdf67b65b0 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/symptoms/SymptomsEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/symptoms/SymptomsEditFragment.java @@ -84,7 +84,7 @@ public static SymptomsEditFragment newInstance(Case activityRootData) { activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()) .add(new CountryFieldVisibilityChecker(ConfigProvider.getServerLocale())), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } public static SymptomsEditFragment newInstance(Visit activityRootData) { @@ -94,7 +94,7 @@ public static SymptomsEditFragment newInstance(Visit activityRootData) { activityRootData, FieldVisibilityCheckers.withDisease(activityRootData.getDisease()) .add(new CountryFieldVisibilityChecker(ConfigProvider.getServerLocale())), - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } public static SymptomsEditFragment newInstance(ClinicalVisit activityRootData, String caseUuid) { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/therapy/edit/PrescriptionEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/therapy/edit/PrescriptionEditFragment.java index f34a8e10ecc..d179737e7df 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/therapy/edit/PrescriptionEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/therapy/edit/PrescriptionEditFragment.java @@ -53,7 +53,7 @@ public static PrescriptionEditFragment newInstance(Prescription activityRootData null, activityRootData, null, - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } // Instance methods diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/therapy/edit/TreatmentEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/therapy/edit/TreatmentEditFragment.java index 199558ec248..147b1bb3dfc 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/therapy/edit/TreatmentEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/therapy/edit/TreatmentEditFragment.java @@ -27,6 +27,7 @@ import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; import de.symeda.sormas.app.BaseEditFragment; import de.symeda.sormas.app.R; +import de.symeda.sormas.app.backend.config.ConfigProvider; import de.symeda.sormas.app.backend.therapy.Treatment; import de.symeda.sormas.app.component.Item; import de.symeda.sormas.app.databinding.FragmentTreatmentEditLayoutBinding; @@ -51,7 +52,7 @@ public static TreatmentEditFragment newInstance(Treatment activityRootData) { null, activityRootData, null, - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } // Instance methods diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/visit/edit/VisitEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/visit/edit/VisitEditFragment.java index d6d5bc548ed..4377301a9ae 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/visit/edit/VisitEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/visit/edit/VisitEditFragment.java @@ -27,6 +27,7 @@ import de.symeda.sormas.app.BaseEditFragment; import de.symeda.sormas.app.R; import de.symeda.sormas.app.backend.common.DatabaseHelper; +import de.symeda.sormas.app.backend.config.ConfigProvider; import de.symeda.sormas.app.backend.contact.Contact; import de.symeda.sormas.app.backend.visit.Visit; import de.symeda.sormas.app.databinding.FragmentVisitEditLayoutBinding; @@ -44,7 +45,7 @@ public static VisitEditFragment newInstance(Visit activityRootData, String conta new Bundler().setContactUuid(contactUuid).get(), activityRootData, null, - UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized())); + UiFieldAccessCheckers.forSensitiveData(activityRootData.isPseudonymized(), ConfigProvider.getServerCountryCode())); } @Override