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

Hide/Show ecnrypted values when click on the lock icon #14406

Merged
merged 2 commits into from Mar 18, 2024

Conversation

mauro-miatello
Copy link
Contributor

Description

Encrypted values can have sensitive or private information that the user may not want to show while using the application for security reason. The change shows or hides the value when the user clicks on the lock icon. Even if the value is hidden, it is possible to copy it.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I have tested in my on-premise installation:

  • clicked on icon many times, copied the value both if hidden or showed
  • tried with both Firefox and Chrome to avoid different behaviors with font-size set to 0 px

Test Configuration:

  • PHP version: 8.0.30
  • MySQL version: MariaDB 10.3.38
  • Webserver version: Apache 2.4.58
  • OS version: Ubuntu 20.04.6 LTS

Checklist:

added a span element to hide encrypted values
added a function to show/hide encrypted values with a simple trick because ClipboardJS can't copy display:none element's value
Copy link

what-the-diff bot commented Mar 10, 2024

PR Summary

  • Enhancements in the view display
    The 'view.blade.php' file now includes additional interactive features. One of these is a click event on the lock icon, allowing users to engage with the content in a more interactive manner. Furthermore, elements displaying encrypted custom values have been made identifiable with unique IDs. Their visibility can be toggled on demand, thereby enhancing data security and user control over viewed data.

  • Optimization of default views
    Significant changes have been made in the 'default.blade.php' file for more efficient and user-friendly view management. The original function locating target elements has been removed and replaced with the 'showHideEncValue' function. This function enables or disables visibility of the encrypted custom values and asterisk-hidden elements by simply clicking on the lock icon. The 'if' statement's conditional check has also been updated to be more relevant. Like before, individual elements can be identified with unique IDs, allowing for enhanced data representation and management.

@snipe
Copy link
Owner

snipe commented Mar 10, 2024

Can you show me some screenshots on this?

@mauro-miatello
Copy link
Contributor Author

sure, normally the value is hidden
image
when click on the icon it shows the value
image
currently, the number of asterisks is fixed to 8, independently from the length of the value

@snipe
Copy link
Owner

snipe commented Mar 18, 2024

Nice!

@snipe snipe merged commit 0e2aaeb into snipe:develop Mar 18, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants