User Details Functions#

Function

Description

Example

fn.request_user_name

Return the logged in username.

{{fn.request_user_name}}

fn.request_user_role

Return the logged in user role.

{{fn.request_user_role}}

fn.request_user_email

Return the logged in user email address.

{{fn.request_user_email}}

fn.request_user_pkid

Return the logged in user pkid.

{{fn.request_user_pkid}}

fn.request_user_type

Return the logged in user’s user type, such as “Admin”, “End User” and “End User + Admin”.

{{fn.request_user_type}}

Function

Description

Example

fn.list_end_user_names

Given a lookup direction and specified target hierarchy type as input parameters, return a list of end users (data.User.username) from the current hierarchy scope to the specified level. The user type should contain “End User”. The direction can be “up”, “down”, “above”, “below”, or “local”. Target hierarchy type can be “System”, “Hcs”, “Provider”, “Reseller”, “Customer”, “IntermediateNode”, “Site”, “LinkedSite”. To exclude target hierarchy type or direction from the resulting filter, pass fn.null.

{{# fn.list_end_user_names
up Customer #}}

fn.user_type_from_context_details

Given a provided context with user details, typically “input” or “pwf”, returns the user type for the user based on the role and authorized admin hierarchy association.

  • User type is “End User + Admin” if role is selfservice and there is an associated authorized admin hierarchy

  • User type is “End User” when role is selfservice without authorized admin hierarchy

  • User type is “Admin” when role is administration

  • Otherwise, user type is Invalid

{{fn.user_type_from_context_details
input }}