| check_privilege function (from a list)

Related topics
Contained in package wwsec_app_priv. Call this function to check if a user has any of a passed-in list of privileges. function check_privilege ( p_object in varchar2, p_privilege_array in wwsec_api.array, p_name in varchar2, p_auto_redirect in boolean default TRUE, P_requested_url in varchar2 default wwctx_api.get_product_schema || '.home', p_owner in varchar2 default wwctx_api.get_product_schema p_reqd_auth_level in NUMBER default wwctx_api.REQUIRED_AUTHENTICATION_LEVEL ) return boolean;

Version: Oracle Portal 3.0.6.6.5 or later
Parameters:
p_object | The type of object being secured. Note: For most UI administrative processes, the object type is wwsec_api.ADMIN_OBJ. Datatype: in varchar2
p_privilege_array | The list of privilege names being checked. Note: These names are specified with privilege name constants of the wwsec_api package. For most UI administrative processes, this is wwsec_api.EXECUTE_PRIV. Datatype: in wwsec_api.array
p_name | A unique identifier for the specified object instance. Datatype: in varchar2
p_auto_redirect | Indicates if the screen should display the log on page if the user is not logged in and does not have sufficient privileges in public mode to access the object. If FALSE is returned, the user is redirected to the log on page. Note:Because this parameter defaults to TRUE, it has no effect If the user is already logged in. Datatype: in boolean Default: TRUE
p_requested_url | The URL of the object for which privileges are being checked. Note: The location in p_requested_url is where the user's browser points after a successful authorization. Datatype: in varchar2 Default: wwctx_api.get_product_schema || '.home'
p_owner | The name of the schema that owns the p_name object. Datatype: in varchar2 Default: wwctx_api.get_product_schema
p_reqd_auth_level | The minimum authentication level that a calling function requires in order to pass a privilege check. The API fails the authorization check if the current authentication level (returned by wwctx_api.get_authentication_level) is less than the value of this parameter. Note: If the object is granted PUBLIC access, the authentication level is not checked at all. The default value for this parameter is REQUIRED_AUTHENTICATION_LEVEL and this is equivalent to PUBLIC_AUTHENTICATION. This implies that the user must be authenticated by the Single Sign-On Server for the authorization check to pass. Portlets that require authorization fail the authorization check for a weakly authenticated user. If a portlet wants to display itself to a weakly authenticated user, it should pass p_reqd_auth_level as WEAK_AUTHENTICATION while invoking the authorization APIs. Note: This parameter is available in Oracle Portal 3.0.9 or later. Datatype: number Default: wwctx_api.REQUIRED_AUTHENTICATION_LEVEL
Returns: This function returns TRUE if the user has any privilege on the specified list. If the user does not, it returns FALSE. Exceptions: This function returns no exceptions. Unexpected errors are stacked and, if the user has insufficient privileges to access the requested object, result in an error page being displayed. No redirect takes place. Example: l_priv_array wwsec_api.array; l_priv_array(1):= wwsec_api.PAGE_PRIV; if wwsec_app_priv.check_privilege ( p_object => wwsec_api.PAGE_OBJ, p_privilege_array => l_priv_array, p_name => '0/156', p_requested_url => wwctx_api.get_product_schema ||'.wwsec_app_user_mgr.display_user_mgr' ) then...

Related topics
Security API package | PDK PL/SQL API Reference - Home

Back to top
The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio