-
Notifications
You must be signed in to change notification settings - Fork 143
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
Feature 13093 data protection update #13170
Conversation
…ject into feature-13093_Data_protection_update
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=13170 |
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=13170 |
if (field.getAnnotation(PersonalData.class) != null) { | ||
excludedForCountries = field.getAnnotation(PersonalData.class).excludeForCountries(); | ||
|
||
} else { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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(), ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rename to fieldDescription
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still needed?
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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
…ject into feature-13093_Data_protection_update
…erge with development
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=13170 |
Fixes #13093