|
check_privilege function (at least) |
|
Contained in package wwsec_app_priv. Call this function to check if the user has at least a given privilege code value for those privileges that have hierarchical code values. When using this function, set the privilege_code to the minimum privilege that you expect the user to have to access the object. Note: A typical use would be to learn if a user has a VIEW privilege for a particular folder. function check_privilege (
) 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_code |
The privilege code being checked. Note: Set this parameter to the minimum privilege code the user should have to access the object. Datatype: in number |
|
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 a user is not logged in and does not have sufficient privileges in public mode to access the object. Notes:
Datatype: in boolean |
|
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 |
|
p_owner |
The name of the schema that owns the p_name object. Datatype: in varchar2 |
|
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 |
|
Returns: This function returns TRUE if the user has at least the specified privilege code. 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: if wwsec_app_priv.check_privilege
then... |
|
|
The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio |