Search Results check_admin_access




Overview

APPS.AMS_ACCESS_PVT is a private (PVT) PL/SQL package within the Oracle Marketing (AMS) module that centralizes the creation, validation, and security enforcement of access records for marketing activities. It governs who may view, update, approve, or administer objects such as campaigns, events, offers, and funds. The package is declared with AUTHID CURRENT_USER, so it executes under the privileges of the calling session rather than its owner, and it exposes a strongly typed access_rec_type record that mirrors the columns of the AMS_ACT_ACCESS entity, including the ADMIN_FLAG, APPROVER_FLAG, OWNER_FLAG, DELETE_FLAG, USER_OR_ROLE_ID, and active-date range.

Key Procedures and Functions

The package exposes sixteen documented subprograms, all oriented around the access-record lifecycle and the security checks that consumers perform against it.

  • CREATE_ACCESS — Inserts a new access record through the standard EBS API envelope (API version, init message list, commit, validation level, return status, message count/data, and the access record), returning the generated access identifier. It sets the object version number, enforces uniqueness when an identifier is supplied, defaults missing flags to Y or N, and validates supplied flag values.
  • UPDATE_ACCESS — Applies changes to an existing access record.
  • DELETE_ACCESS — Removes or logically retires an access record.
  • LOCK_ACCESS — Acquires a lock on an access record to serialize concurrent modification.
  • VALIDATE_ACCESS, CHECK_ACCESS_RECORD, and CHECK_ACCESS_ITEMS — Validate the structure and contents of access records and their associated items.
  • CHECK_OWNER — Determines whether a given user or role is the owner of an object.
  • CHECK_VIEW_ACCESS, CHECK_UPDATE_ACCESS, and CHECK_ADMIN_ACCESS — Return access decisions for viewing, updating, and administering an object. CHECK_ADMIN_ACCESS specifically tests whether the calling user or role holds administrative rights, corresponding to the ADMIN_FLAG column and the administrative role assignments used across marketing objects.
  • UPDATE_OBJECT_OWNER — Reassigns ownership of the underlying object.
  • CHECK_FUNCTION_SECURITY — Validates functional security for a requested operation.
  • GET_SOURCE_CODE — Returns source-code classification used to interpret access rules.
  • INIT_ACCESS_REC and COMPLETE_ACCESS_REC — Initialize a default access record and finalize it before persistence.

Tables Accessed

The package operates against the core marketing access model. AMS_ACT_ACCESS, AMS_ACT_ACCESS_DENORM, and AMS_ACT_ACCESS_S are the base, denormalized, and sequence population tables holding access rows. AMS_CAMPAIGNS_ALL_B, AMS_EVENT_HEADERS_ALL_B, AMS_EVENT_OFFERS_ALL_B, OZF_FUNDS_ALL_B, and OZF_OFFERS are the secured business objects whose ownership and visibility are resolved. AMS_SOURCE_CODES supports source-code lookups. JTF_RS_GROUPS_DENORM and JTF_RS_GROUP_MEMBERS supply resource-group and role membership data used by the security checks. DUAL and PLITBLM are used for singleton queries and list handling.

Usage Notes

As a private package, AMS_ACCESS_PVT is not intended for direct customer invocation; it is called by thirty other AMS packages and by the Oracle Forms and OAF user interfaces that present marketing campaigns, events, offers, and funds. Typical entry points include the marketing workbench, where CHECK_ADMIN_ACCESS, CHECK_VIEW_ACCESS, and CHECK_UPDATE_ACCESS drive button and menu enablement, and concurrent or bulk maintenance programs that call CREATE_ACCESS, UPDATE_ACCESS, or UPDATE_OBJECT_OWNER. Custom extensions should rely on the public AMS APIs or the same validation and message-handling conventions; direct calls require the caller to honor the record structure, flag rules, and object version number, and to avoid passing FND_API global message values into the record.