Search Results get_ego_user




Overview

BOM_SECURITY_PUB is a public PL/SQL package in the Oracle E-Business Suite APPS schema that provides security-checking services for bills of material and item data. Its primary purpose is to determine whether a given user is authorized to perform a particular function against a specified object or instance, delegating the substantive authorization logic to the Oracle E-Business Suite data security layer exposed through EGO_DATA_SECURITY. The package therefore acts as a thin, BOM-specific wrapper around the shared item and object security infrastructure, allowing manufacturing and engineering modules to enforce role-based and grant-based access consistently.

In both Oracle EBS 12.1.1 and 12.2.2, this package belongs to the manufacturing family (BOM prefix) and is classified as a public API, meaning it is intended to be called by other application code rather than being restricted to internal use. The package body carries a header version of 120.2, reflecting a long-standing, stable interface.

Key Procedures and Functions

The documented package exposes four callable units:

  • CHECK_USER_PRIVILEGE — The function most commonly sought by developers. It accepts an API version, a function name, an object name, up to five instance primary-key values, and an optional user name, and returns a VARCHAR2 flag indicating whether the user holds the requested privilege. A notable behavior evident from the source is that when p_user_name is null, the function short-circuits and returns 'T' (true) without calling the security layer, effectively granting access when no user context is supplied. Otherwise it forwards all parameters to EGO_DATA_SECURITY.Check_Function.
  • CHECK_ITEM_PRIVILEGE — A convenience function tailored to inventory items. It resolves the effective user (defaulting to the value returned by GET_EGO_USER when no user name is passed), then calls EGO_DATA_SECURITY.Check_Function with the object name fixed to 'EGO_ITEM' and the item and organization identifiers mapped to the first two instance key positions.
  • GET_EGO_USER — A helper function that derives the current EGO user identity, returning a VARCHAR2 value used as the default grantee key for privilege checks.
  • GET_FUNCTION_NAME_TO_CHECK — A helper that resolves the appropriate function name to be passed into the security check, supporting callers that do not hard-code the function identifier.

Tables Accessed

The package references the FND_GRANTS table (through its APPS synonym). FND_GRANTS stores the grant records that define which grantees hold which privileges on which objects, and it supplies the grantee key used when resolving the effective user. The actual authorization evaluation is performed by EGO_DATA_SECURITY.Check_Function, which reads the underlying data security and grant metadata; BOM_SECURITY_PUB itself performs only minimal direct data access.

Usage Notes

BOM_SECURITY_PUB is referenced by four other packages, confirming its role as a shared utility within the manufacturing and engineering stack. It is typically invoked from form-level logic, concurrent program validation, and custom extensions that must verify whether the current user may view or manipulate a specific bill, item, or organization. Developers should note the null-user behavior of CHECK_USER_PRIVILEGE: passing a null user name bypasses the security evaluation entirely and returns 'T'. Callers requiring genuine enforcement must therefore supply a valid user name, or use CHECK_ITEM_PRIVILEGE, which resolves the user automatically via GET_EGO_USER.