[MarkLogic Dev General] Error in XCC .NET
APIContentPermission.NewUpdatePermission ?
Ron Hitchens
ron.hitchens at marklogic.com
Wed Dec 10 20:36:50 PST 2008
Mariano,
Sorry for not following up. When I fixed the typo
in the convenience function, I also found another bug
deeper in the code that affects the C# ContentCapability
constructor. Unfortunately, using ContentPermission
when inserting a document does not work at all in XCC/.NET.
The workaround is to insert the document without any
ContentPermission options. Then issue a separate AdHocQuery
request to set the desired permissions with XQuery.
This has been fixed in 4.0-3, which will be out
fairly soon. If there is ever a 3.2-10 update, it
will also be fixed there. You *can* use XCC 4.0-x
with a 3.2-x server.
On Dec 10, 2008, at 4:28 AM, Mariano Grau Calín wrote:
> Thanks,
>
> But I tried also that function and return null capability.
>
>
>
> -----Mensaje original-----
> De: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com
> ] En nombre de Ron Hitchens
> Enviado el: martes, 09 de diciembre de 2008 23:21
> Para: General Mark Logic Developer Discussion
> Asunto: Re: [MarkLogic Dev General] Error in XCC .NET
> APIContentPermission.NewUpdatePermission ?
>
>
> Mariano,
>
> Congratulations, you've discovered an obscure bug
> in the XCC/.NET code. It looks like a cut/paste error
> that only applies to XCC/.NET, not XCC/Java.
>
> This will be fixed in XCC 4.0-3 and 3.2-10.
>
> In the meantime, you can work around this by calling
> the ContentPermission constructor, like this:
>
> ContentPermission perm = new ContentPermission
> (ContentCapability.Capability.Update, "role-name");
>
> Mark Logic Bug #6776 has been opened to track this issue.
>
> On Dec 9, 2008, at 12:50 AM, Mariano Grau Calín wrote:
>
>> Hello:
>>
>> I am working with the .NET API and when use the
>> ContentPermission.NewUpdatePermission("role-name") function it
>> return a ContentPermission with insert capability !!!
>>
>> The functions
>> ContentPermission.NewExecutePermission
>>
>> ContentPermission.NewInsertPermission
>>
>> ContentPermission.NewReadPermission
>>
>> work fine and returns correct ContentPermission
>>
>> I used version 3.2-6 .NET API but last version 3.2-9 get same result.
>>
>> Thanks,
>>
>> Mariano Grau
>> Dpto. Sistemas Grupo Joly
>> mgrau @ grupojoly.com
>>
>> _______________________________________________
>> General mailing list
>> General at developer.marklogic.com
>> http://xqzone.com/mailman/listinfo/general
>
> ---
> Ron Hitchens {ron.hitchens at marklogic.com} 650-655-2351
>
>
>
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
---
Ron Hitchens {ron.hitchens at marklogic.com} 650-655-2351
More information about the General
mailing list