Search Results jtf_cal_grants




Overview

The APPS.CAC_CAL_PRIVS_PVT package body is a private (PVT) PL/SQL API within the Oracle E-Business Suite 12.1.1 and 12.2.2 Calendar (CAC) module. It encapsulates the low-level logic required to grant and maintain calendar-related privileges for resources such as users or resource groups. The package acts as an internal worker module that delegates privilege creation to the Oracle Application Object Library grants infrastructure, specifically FND_GRANTS_PKG, while translating calendar-specific concepts (appointment access, task access, and booking access) into the generic grant model.

The package is classified as private, meaning it is not intended as a public integration point. It is a supporting component used by other Calendar APIs to persist delegated access rights so that one resource can act on another resource's calendar. The module includes a package-level constant G_PKG_NAME (historically set to 'JTF_CAL_GRANTS') that identifies the grants program tag CAC_CAL_ACCESS used when writing grant records.

Key Procedures and Functions

The ETRM metadata documents two procedures for this package body:

  • CREATE_GRANTS — Creates new grant records that delegate calendar privileges to a specified grantee. Based on the source excerpt, the logic branches conditionally on the access type supplied (for example, appointment access is non-null), and then calls FND_GRANTS_PKG.GRANT_FUNCTION with an INSTANCE-type grant against the CAC_CAL_RESOURCES object. The grant is registered against the calendar program (CALENDAR) and program tag CAC_CAL_ACCESS. If the underlying grants API does not return success, an unexpected error is raised via FND_API.G_EXC_UNEXPECTED_ERROR, ensuring the transaction fails cleanly.
  • UPDATE_GRANTS — Modifies existing calendar grant records, typically to adjust the start date, end date, or access flags of a previously created grant. It mirrors the create path but applies changes to an already-persisted grant rather than inserting a new delegation.

Both procedures operate on a resource identified by a resource id and resource type pair, and both rely on FND_GRANTS_PKG as the transactional engine for the actual grant write.

Tables Accessed

The package reads and writes the following tables through APPS synonyms:

  • FND_GRANTS — The central grant repository where the actual delegation records (grantee, object, instance, dates, and menu) are stored. This is the primary write target.
  • FND_MENUS — Referenced to resolve the menu function that represents the specific calendar access being granted (appointment, task, or booking access).
  • FND_OBJECTS — Holds the object definition CAC_CAL_RESOURCES, which anchors the instance-level grant.
  • FND_OBJECT_INSTANCE_SETS — Used to resolve the object instance set. The user's search term p_instance_set_id corresponds directly to the C_INSTANCE_SET_ID cursor in the source, which selects instance_set_id from this table where instance_set_name = 'JTF_TASK_RESOURCE_TASKS'. This identifier scopes the grant to the correct instance set so that permissions align with the Task/Calendar resource model.

Usage Notes

Because this is a private API, it is not called directly by end users or external integrations. It is typically invoked from Calendar forms or from other Calendar (CAC) packages that require privilege persistence, such as when a user shares a calendar or delegates appointment handling. The p_instance_set_id parameter is supplied by the calling layer, usually derived from the JTF_TASK_RESOURCE_TASKS instance set, and is passed into FND_GRANTS_PKG to bind the grant to the correct instance context.

Deployments on 12.1.1 and 12.2.2 should treat this package as internal. Custom code should never call CREATE_GRANTS or UPDATE_GRANTS directly; instead, it should use the supported public Calendar APIs that in turn invoke this private worker. Any grants created here are visible through the standard FND grants administration screens and participate in the same date-range and revocation semantics as other FND grant records.