Let's Reconnect, thank you for making 2022 our best year yet.

Look Back
Set security context in the script — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Set security context in the script

Question
1
Views
0
Comments
edited Nov 10, 2022 5:07PM in Fusion Service

Summary:

We have a scenario where the record creation requires additional privileges and part of the script should be executed as privileged function.

mainFunction_unprivileged body

//do some processing, privileged not required for this par

...

def hasRole = adf.context.getSecurityContext().isUserInRole('CUSTOM_JOB_ROLE')

if(!hasRole){

additionalFunction_unprivileged()

}

Is it possible to call additionalFunction_unprivileged function as privileged even though it's not defined as privileged in Application composer?


setSecurityContext

public void setSecurityContext(SecurityContext ctx)

Internal:Applications should not use th

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!