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 values.

Example:

  • The user joe is a member of the groupsadmin(attribute: dept=10) andmanager (attribute: dept=20), GET_UG_ATTR(‘dept’,’30’) will return10,20.

  • The user is a member of groupsadmin andmanager(without any attributes),GET_UG_ATTR(‘dept’,’30’) will return30.

  • The user is not a member of any group,GET_UG_ATTR(‘dept’,’30’) will return30.

Usage: can be used in:

  • Row Level Filter Policies - row level filters expressions

  • Example:dept_id in (${{GET_UG_NAMES_Q(‘dept’,’30’)}})

  • Masking policy - Custom masking condition

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

  • Policy condition

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