Skip to main content

Privacera Documentation

With default Value - GET_UG_ATTR(‘attribute_key’,‘default_value’)

Description: returns the list of user groups to which the querying user is a member. If the user is not a member of any group, ‘default_value’ will be returned. Can be used for comparison of numeric or character values.

Example:

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

  • The user does not have any attribute or does not have a‘dept’ attribute,GET_USER_ATTR(‘dept’,’20’) will return‘20’.

Usage: can be used in:

  • Row Level Filter Policies - row level filters expressions

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

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

  • Masking policy - Custom masking condition

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

  • Policy condition

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