recourse 5.10.0 → 5.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/recourse/helpers/values.rb +6 -2
- data/lib/recourse/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: afb6a61d5d13796a096ef7b08e10dd5be4e78f84394f5956e1128b5d9cd84c85
|
|
4
|
+
data.tar.gz: dcdba66e3572b1df47503614634fc69441baacdbf7de8dbca68d5fae3c97f98a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e68943cc95a7fdf3e0be426cd893e7b3e42fc8e4526bbe2cdafb1d646c4d3e48e287947776bd8ed18ff3d9b3d8d608c2878140b633759053bb2c88c10b498fb4
|
|
7
|
+
data.tar.gz: 59de342b0a61faefdf645f4eddb71f5979e3ecdd55c0855536635a30662eb16e26d98fa5a13b8bc824a3f16dabcc3b6c7ba478ae5334439e61ec471b2e7ba093
|
|
@@ -29,7 +29,7 @@ module Recourse
|
|
|
29
29
|
# Nothing to disclose is nothing to mask: an encrypted column the record has no
|
|
30
30
|
# value for reads as the dash, rather than as one asterisk hiding one.
|
|
31
31
|
def value_control(column)
|
|
32
|
-
return masked_value
|
|
32
|
+
return masked_value column if masked? column
|
|
33
33
|
|
|
34
34
|
tag.div resource_value(column), class: 'form-control-plaintext'
|
|
35
35
|
end
|
|
@@ -41,7 +41,11 @@ module Recourse
|
|
|
41
41
|
# PII is a page's to show and nobody's to leak by accident, so it arrives as one
|
|
42
42
|
# asterisk per character with the plaintext in an attribute the reveal reads: a
|
|
43
43
|
# screenshot of the page discloses nothing, and reading one value takes a click.
|
|
44
|
-
|
|
44
|
+
# What the column holds rather than what a cell would make of it: the reveal
|
|
45
|
+
# writes what it is given as text, so markup would be read out as markup -- and
|
|
46
|
+
# one asterisk per character of a tag counts nothing anybody is hiding.
|
|
47
|
+
def masked_value(column)
|
|
48
|
+
value = resource_record.attributes[column].to_s
|
|
45
49
|
options = {
|
|
46
50
|
class: 'form-control-plaintext d-flex gap-2 align-items-end',
|
|
47
51
|
data: { controller: 'reveal', reveal_plain_value: value },
|
data/lib/recourse/version.rb
CHANGED