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

1062: Force encryption on all elements #117

Merged
merged 5 commits into from
Jun 28, 2024

Conversation

jekuaitk
Copy link
Contributor

@jekuaitk jekuaitk commented Jun 27, 2024

https://leantime.itkdev.dk/tickets/showKanban?tab=ticketdetails#/tickets/showTicket/1062

  • Adds a default encryption profile setting
  • Uses above setting in enable command
  • Forces all elements to be encrypted

@jekuaitk jekuaitk requested a review from cableman June 28, 2024 08:09
public function formAlter(array &$form, FormStateInterface $form_state, string $form_id) {
if ('webform_ui_element_form' === $form_id) {
if (isset($form['element_encrypt'])) {
unset($form['element_encrypt']);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to set access = false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With the current preSave hook ensuring encryption on all elements are enabled, the end behaviour would be the same.

Maybe from an understanding point of view using access = false makes more sense? I'm not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To avoid potential issues with other parts of code accessing this element_encryption we will use access = false.

@jekuaitk jekuaitk requested a review from cableman June 28, 2024 10:54
@jekuaitk jekuaitk merged commit 3411356 into OS2Forms:develop Jun 28, 2024
7 checks passed
@jekuaitk jekuaitk deleted the feature/encryption-modifications branch June 28, 2024 10:58
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.

2 participants