You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Block access to sensitive field data for unauthorized users #50
I'm curious as to why you think readOnly should prevent that, technically they're not editing the field, only reading it. What's the use case you're trying to achieve?
Good point, maybe it's just me but it seems counterintuitive to be able to interact with a field that is set to readOnly, I assumed it would just display as a password field type instead.
Sorry yes, I worked around it by serving different fields based upon user permission. So user with privileges gets field as sensitive otherwise as readOnlypassword
There are other ways you can achieve similar results too, for example you could hook into the backend.ajax.beforeRunHandler event and throw an ApplicationException if you detect someone is trying to onShowValue() without the correct level of access to the data.
Is there anything actionable left in this issue or are you fine with your current solution?
There are other ways you can achieve similar results too, for example you could hook into the backend.ajax.beforeRunHandler event and throw an ApplicationException if you detect someone is trying to onShowValue() without the correct level of access to the data.
Activity
LukeTowers commentedon Mar 18, 2021
I'm curious as to why you think readOnly should prevent that, technically they're not editing the field, only reading it. What's the use case you're trying to achieve?
seanthepottingshed commentedon Mar 18, 2021
Good point, maybe it's just me but it seems counterintuitive to be able to interact with a field that is set to
readOnly, I assumed it would just display as apasswordfield type instead.LukeTowers commentedon Mar 18, 2021
I'm not really sure what the point of that happening would be tbh, are you trying to hide the sensitive data from unprivileged users?
seanthepottingshed commentedon Mar 18, 2021
Sorry yes, I worked around it by serving different fields based upon user permission. So user with privileges gets field as
sensitiveotherwise asreadOnlypasswordLukeTowers commentedon Mar 18, 2021
There are other ways you can achieve similar results too, for example you could hook into the
backend.ajax.beforeRunHandlerevent and throw an ApplicationException if you detect someone is trying toonShowValue()without the correct level of access to the data.Is there anything actionable left in this issue or are you fine with your current solution?
seanthepottingshed commentedon Mar 18, 2021
There are other ways you can achieve similar results too, for example you could hook into the backend.ajax.beforeRunHandler event and throw an ApplicationException if you detect someone is trying to onShowValue() without the correct level of access to the data.
Good to know!
[-]ReadOnly Sensitive Form Field[/-][+]Block access to sensitive field data for unauthorized users[/+]