Expand my Community achievements bar.

SOLVED

Problem with applying MyPolicy "Permisson denied"

Avatar

Level 2

Hello everyone,

we need to apply policies to PDFs using LiveCycle web services. We
first have tried with the API and we got the same problem with both
approach:

(for it to be easier i'll display the API code)

when we use the example it works just fine:
policy set: Global Policy Set
policy name: Restrict to All Principals

Document protectPDF =  documentManager.applyPolicy(
                         inPDF,
                         "LoanPDF",
                         "Global Policy Set",
                         "Restrict to All Principals",
                         null,null);

so we have created custom policies with the LC Gui (EDC)
and when we try to use them with our client we get this error:

Document protectPDF =  documentManager.applyPolicy(
                         inPDF,
                         "LoanPDF",
                         "MyPolicies",
                         "antoinetest",
                         "PCW","antoine.blanchard");

=>adobe.edc.sdk.SDKException: Failed to retrieve policy
[MyPolicies:antoinetest] -- Permission denied(error code bin: 1296,
hex: 0x510)

does anyone have a solution, explanation or whatever?
Thanks for your help

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Just a thought .... try leaving the parameter for policy set (where you have "MyPolicies") as null

Haven't called this through the API only used it in an orchestration and I know that parameter is optional in general .... required if policy is in a Policy Set and optional if it is not.

View solution in original post

4 Replies

Avatar

Former Community Member

Does antoine.blanchard from the domain PCW have permissions as a document publisher.

That is in the property of the custom policy set you created there should be a tab for publishers. Any users listed in that area are allowed to apply a policy from that set. Did you add antoine.blanchard from PCW into this area?  If so is the spelling of the domain and username correct?

Avatar

Level 2

I didn't create any custom policy set. The policy is located under MyPolicies which are the user policies. The creator and the publisher are the same person. There is no possibility to change the publishers for the "MyPolicies", is there?

What's the problem?

Christoph

Avatar

Correct answer by
Former Community Member

Just a thought .... try leaving the parameter for policy set (where you have "MyPolicies") as null

Haven't called this through the API only used it in an orchestration and I know that parameter is optional in general .... required if policy is in a Policy Set and optional if it is not.

Avatar

Level 2

That's the solution! The parameter must be null!

Thx!

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----