Skip to main content

Privacera Documentation

GET_USER_ATTR_Q(‘attribute_key’)

Description: returns the list of values of attribute (attribute_key) mapped to the user (with each attribute name in single quotes, separated by comma). Can be used for comparison of character values.

Example:

  • The user joe is a member of the groupadmin(attribute: location=mumbai), GET_USER_ATTR_Q(‘location’) will return‘mumbai’.

Usage: can be used in:

  • Row Level Filter Policies - row level filters expressions

  • Example:location in ${{GET_USER_ATTR_Q('location')}}

  • Masking policy - Custom masking condition

  • Example:CASE WHEN location in (${{GET_USER_ATTR_Q('location')}}) THEN {col} ELSE 'NONE' END

  • Policy condition

  • Example:GET_USER_ATTR_Q(‘location’)==’\'mumbai\’'