CodeAccessPermission.isSubsetOf Method [AX 2012]

Determines whether a current permission is a subset of the specified permission when it is overridden by a derived class.

public abstract boolean isSubsetOf(CodeAccessPermission target)

Run On

Called

Parameters

target
Type: CodeAccessPermission Class
A CodeAccessPermission class object.

Return Value

Type: boolean
true if a current permission is a subset of a specified permission; otherwise, false.

You can override the method as part of the process of making an API more secure.

The following example shows how to override the isSubsetOf method to determine whether permissions that are stored in the current object are located in _target.

public boolean isSubsetOf(CodeAccessPermission _target) 
{ 
    SysTestCodeAccessPermission sysTarget = _target; 
    return this.handle() == _target.handle(); 
}

Community Additions

ADD
Show: