Expand my Community achievements bar.

NotAllowedError: Security settings prevent access to this property or method- While using function

Avatar

Level 1

Hi All,

I am getting "NotAllowedError: Security settings prevent access to this property or method." while using function signatureSetSeedValue.

Code:

if(P3_443.RadioButtonList.rawValue!=null && P3_443.RadioButtonList.rawValue!="")
{
this.presence = "visible";
//var mydoc = xfa.resolveNode("FormData.P3_443.signature.ePadSignatureField3");
var f = event.target.getField("FormData[0].P3_443[0].signature[0].ePadSignatureField3[0]"); // get signature field
//var f = event.target.getField(GetFQSOMExp(this));

f.signatureSetSeedValue(
{
reasons: ["Advisor"],
flags: 8
} );
}

Please help me on this.

1 Reply

Avatar

Former Community Member

The "signatureSetSeedValue" method is "security restricted".  This is documented in the Acrobat JavaScript reference:

http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.p...

See the note on page 466 -  

Note:The method can be executed during a batch, application initialization or console event. See “Privileged versus non-privileged context” on page 32 for details.

Certifying signatures are signatures with a SignatureInfo object mdp property value of allowNone, default, or defaultAndComments.

Not allowed in Adobe Reader.

Refer to the Acrobat 8.0 Security Feature User Reference to obtain a deeper understanding of the use of signature seed values.

More info...

Privileged versus non-privileged context

Some JavaScript methods, marked in this book by S in the third column of the quick bar, have security restrictions. These methods can be executed only in a privileged context, which includes console, batch and application initialization events. All other events (for example, page open and mouse-up events) are considered non-privileged.

The description of each security-restricted method indicates the events during which the method can be executed.

Beginning with Acrobat 6.0, security-restricted methods can execute without restrictions if the document certifier’s certificate is trusted for running embedded high privilege JavaScript.

In Acrobat versions earlier than 7.0, menu events were considered privileged contexts. Beginning with Acrobat 7.0, execution of JavaScript through a menu event is no longer privileged. You can execute security-restricted methods through menu events in one of the following ways:

●By opening the JavaScript category of the Acrobat preferences and checking the item named “Enable Menu Items JavaScript Execution Privileges”.

●By executing a specific method through a trusted function (introduced in Acrobat 7.0). Trusted functions allow privileged code—code that normally requires a privileged context to execute—to execute in a non-privileged context. For details and examples, see app.trustedFunction.

Regards

Steve