Skip to main content

Privacera Documentation

GET_USER_ATTR(‘attribute_key’)

Description: returns the list of attributes mapped to the user (separated by comma). Can be used for comparison of numeric or character values.

Example:

  • The user has an attribute: dept=10, GET_USER_ATTR(‘dept’) will return‘NY’.

Usage: can be used in:

  • Row Level Filter Policies - row level filters expressions

  • Example:dept_id in (${{GET_USER_ATTR(‘dept’)}})

  • Example:location=’${{GET_USER_ATTR(‘location’)}}’

  • Masking policy - Custom masking condition

  • Example:CASE WHEN dept_id in (${{GET_USER_ATTR(‘dept’)}}) THEN {col} ELSE '0' END

  • Policy condition

  • Example:GET_USER_ATTR(‘location’)=='mumbai'