workflow::case::get_user_roles (public)

 workflow::case::get_user_roles -case_id case_id [ -user_id user_id ]

Defined in packages/workflow/tcl/case-procs.tcl

Get the roles which this user is assigned to. Takes deputies into account, so that if the user is a deputy for someone else, he or she will have the roles of the user for whom he/she is a deputy.

Switches:
-case_id
(required)
The ID of the case.
-user_id
(optional)
The user_id of the user for which you want to know the roles. Defaults to ad_conn user_id.
Returns:
A list of role_id's of the roles which the user is assigned to in this case.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::case::action::permission_p workflow::case::action::permission_p (public) workflow::case::get_user_roles workflow::case::get_user_roles workflow::case::action::permission_p->workflow::case::get_user_roles ad_conn ad_conn (public) workflow::case::get_user_roles->ad_conn util_memoize util_memoize (public) workflow::case::get_user_roles->util_memoize workflow::case::cache_timeout workflow::case::cache_timeout (private) workflow::case::get_user_roles->workflow::case::cache_timeout workflow::case::get_user_roles_not_cached workflow::case::get_user_roles_not_cached (private) workflow::case::get_user_roles->workflow::case::get_user_roles_not_cached

Testcases:
No testcase defined.
Source code:
    if { (![info exists user_id] || $user_id eq "") } {
        set user_id [ad_conn user_id]
    }
    return [util_memoize [list workflow::case::get_user_roles_not_cached $case_id $user_id]  [workflow::case::cache_timeout]]
Generic XQL file:
packages/workflow/tcl/case-procs.xql

PostgreSQL XQL file:
packages/workflow/tcl/case-procs-postgresql.xql

Oracle XQL file:
packages/workflow/tcl/case-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: