CreateWithNewDataRoles(params string[] dataRoles)
This method creates a new end-user security context with replacement data roles from an array.
Declaration
// C#
public OracleEndUserSecurityContext CreateWithNewDataRoles(params string[] dataRoles)Parameters
-
dataRolesRole names
Return Value
A new OracleEndUserSecurityContext with updated roles.
Exceptions
ArgumentNullException - Thrown when dataRoles is null.
Remarks
This method creates a new OracleEndUserSecurityContext instance and does not modify the current instance. The new instance preserves the existing database access token, end user principal, and attributes.
The supplied dataRoles is stored as an immutable list in the returned security context.
Code Sample
var withRoles = ctx.CreateWithNewDataRoles("HR_READ", "PAYROLL_VIEW");