Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 13093 data protection update #13170

Merged
merged 7 commits into from
Oct 30, 2024

Conversation

sergiupacurariu
Copy link
Contributor

Fixes #13093

@sormas-vitagroup
Copy link
Contributor

@sormas-vitagroup
Copy link
Contributor

if (field.getAnnotation(PersonalData.class) != null) {
excludedForCountries = field.getAnnotation(PersonalData.class).excludeForCountries();

} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change to else if

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

@@ -171,7 +172,29 @@ private static String getCaption(FieldData fieldData) {
}

private static String getDescription(FieldData fieldData) {
return I18nProperties.getPrefixDescription(fieldData.getI18NPrefix(), fieldData.getField().getName(), "");
String prefixDescription = I18nProperties.getPrefixDescription(fieldData.getI18NPrefix(), fieldData.getField().getName(), "");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rename to fieldDescription

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data protection dictionary is country disease and feature dependent so it should not have this extra description, but should not show personal or sensitive in the data protection colum

import com.vaadin.event.FieldEvents;
import com.vaadin.v7.ui.RichTextArea;

public class RichTextAreaCustom extends RichTextArea {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's not needed anymore. Removed.

initializeAccessAndAllowedAccesses();

FieldHelper.setVisibleWhen(getFieldGroup(), HIV_ART, HIV, Arrays.asList(YesNoUnknown.YES), true);
if (UiUtil.permitted(UserRight.SEE_SENSITIVE_DATA_IN_JURISDICTION)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

making this field inaccessible should be done similarly like you did for the NullableOptionGroup field

@@ -348,8 +348,13 @@ private String getCustomDocumentsPath() {

public void attachDataProtectionDictionaryDownloader(AbstractComponent target) {
new FileDownloader(new StreamResource(() -> new DownloadUtil.DelayedInputStream((out) -> {
String documentPath = FacadeProvider.getInfoFacade().generateDataProtectionDictionary();
IOUtils.copy(Files.newInputStream(new File(documentPath).toPath()), out);
try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert this

@@ -126,4 +137,8 @@ protected <F extends Field> F addFieldToLayout(CustomLayout layout, String prope

return super.addFieldToLayout(layout, propertyId, field);
}

private boolean displayFieldsAllowed() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use similar solution like you did for the NullableOptionGroup

@sormas-vitagroup
Copy link
Contributor

@leventegal-she leventegal-she merged commit 3f44faf into development Oct 30, 2024
7 of 12 checks passed
@leventegal-she leventegal-she deleted the feature-13093_Data_protection_update branch October 30, 2024 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Data Protection for certain Data Fields [5]
3 participants