The UIAccessRequest Class of the com.ms.security.permissions package represents objects that indicate a request to use an extended aspect of the user interface APIs.
public class UIAccessRequest implements ISecurityRequest { // Constructors public UIAccessRequest(int accessType); // Methods public PermissionID getPermissionID(); public boolean isWarningBannerNeeded(); public String toString(); }
UIAccessRequest objects are intended to be used as the security request objects for parameterized security checks involving the user interface permission. The UIPermission.check method expects a UIAccessRequest object as its parameter.
The following example shows how to use a UIAccessRequest object to check permission to create a top-level window:
... // Create a UIAccessRequest object that indicates that you // want to create top-level windows. UIAccessRequest sreq = new UIAccessRequest(UIPermission.ALLOW_TOPLEVELWINDOW); // Check to see that all of your callers have the rights to // create top-level windows. PolicyEngine.checkPermission(sreq); ...
For more information about checking user interface permissions, see the PolicyEngine class and the UIPermission class.