Skip to main content

Privacera Documentation

With default Value - GET_USER_ATTR_NAMES(‘default_value’)

Description: returns the list of attribute keys. If the user does not have any attribute, ‘default_value’ will be returned. Can be used for comparison of numeric values.


  • The user has an attribute: 10=admin,GET_USER_ATTR_NAMES(‘20’) will return10.

  • The user does not have any attribute,GET_USER_ATTR_NAMES(‘20’) will return20.

Usage: can be used in:

  • Row Level Filter Policies - row level filters expressions

  • Example:dept_id in (${{GET_USER_ATTR_NAMES(‘20’)}})

  • Masking policy - Custom masking condition

  • Example:CASE WHEN dept_id in (${{GET_USER_ATTR_NAMES(‘20’)}}) THEN {col} ELSE 'NONE' END

  • Policy condition

  • Example:GET_USER_ATTR_NAMES(‘none’)=='location'