Announcement

Collapse
No announcement yet.

What exactly are "SYS_CONTEXT" and "gl_user_ctx" in a VPD predicate?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • What exactly are "SYS_CONTEXT" and "gl_user_ctx" in a VPD predicate?

    Dear All,

    Can any one explain me, what exactly are "SYS_CONTEXT" and "gl_user_ctx", which we use while defining a predicate in VPD Profile? Pls explain in detail.

    Thanks & Regards,
    Lakshman
    Cheers,
    Murthy

  • #2
    Re: What exactly are "SYS_CONTEXT" and "gl_user_ctx" in a VPD predicate?

    Hi,

    This is used to substitute a condition within the EXTERNAL_PREDICATE, with a VPD Context that is linked to the user.

    Within your External Predciate, you may include the following:

    where corporation_xid = SYS_CONTEXT('gl_user_ctx','CORPORATION_XID')


    Within the VPD_CONTEXT/VPD_CONTEXT_VARIABLE table, the CONTEXT_VAR_NAME will contain the CORPORATION_XID, and the CONTEXT_VAR_VALUE contains the "TEST_CORPORATION".

    For users that are linked to the VPD_CONTEXT, via their User Role, External Predicate will be executed as follows:

    where corporation_xid = 'TEST_CORPORATION'

    If there is no VPD Context linked to a user, all records are returned.

    Hope this helps.

    Regards,

    James
    James Foran
    Toll Global Information Services
    http://www.tollgroup.com

    Comment

    Working...
    X