31.21 IS_ALLOWED Function
This function checks whether the given user is permitted to perform a certain operation on a Task.
Syntax
APEX_HUMAN_TASK.IS_ALLOWED (
p_task_id IN NUMBER,
p_operation IN wwv_flow_approval_api.t_task_operation,
p_user IN VARCHAR2 DEFAULT wwv_flow_security.g_user,
p_new_participant IN VARCHAR2 DEFAULT NULL )
RETURN BOOLEAN;
Parameters
Parameter | Description |
---|---|
p_task_id |
The Task ID. |
p_operation |
The operation to check (see constants c_task_op_### ).
|
p_user |
The user to check for. Default is logged in user. |
p_new_participant |
(Optional) The new assignee in case of Delegate operation. |
Returns
TRUE
if the user given by p_user
is permitted to perform the operation given by p_operation
, FALSE
otherwise.
Example
DECLARE
l_is_allowed boolean;
BEGIN
l_is_allowed := apex_human_task.is_allowed(
p_task_id => 1234,
p_operation => apex_human_task.c_task_op_delegate
p_user => 'STIGER',
p_new_participant => 'SMOON'
);
IF l_is_allowed THEN
dbms_output.put_line('STIGER is a allowed to delegate the task to SMOON for task 1234');
END IF;
END;
Parent topic: APEX_HUMAN_TASK