Demo Instructions
In this demo, the Social Security Number can be both viewed and edited by the node creator demo_user2. This is an example of the permission view own private number.
The value stored in the database is only ever decrypted in the node object if the user has view private number access. Try changing the Social Security Number as demo_user2 or demo_editor and then view the output below as non-privileged user demo_user1 or demo_editor.
$node->field_social_security[0]['private_number'] = eZuiI6bICCq/EqgjnyAClTEkgpPznobdMSFEz7G6bYA= $node->field_social_security[0]['view'] = Ending in 333
Private Number Access Permissions
| demo user1 | |
| demo user2 | view own private number |
| demo editor | |
| demo admin | view private number |
| webmaster |