Hi thomas,

> provide a $context.macro.document (this should be done anyway even
> before XWIKI-4262 is fixed since it's part of the macro informations).
>

+1


>
> Asiri in the meantime i think you should set "sdoc" in context instead
> of "doc". I far as i can see in the code hasProgrammingRights do the
> following:
> * try sdoc content author
> * if no sdoc try doc content author
> * if no doc try current user
>

I discussed setting "sdoc" previously with sergiu and on the dev chat,
however it was not approved :(

Thanks.

- Asiri


>
> On Fri, Mar 19, 2010 at 16:20, Alaina <[email protected]> wrote:
> > On Fri, Mar 19, 2010 at 7:52 AM, Asiri Rathnayake
> > <[email protected]> wrote:
> >> Can you try something like:
> >>
> >> {{groovy}}
> >> def currentDoc = xcontext.vcontext.doc;
> >> {{/groovy}}
> >>
> >> (in macro code)
> >>
> >> I'm just guessing, need to investigate later.
> >>
> >> - Asiri
> >
> > Hi Asiri,
> >
> > Thanks, I tried your suggestion, it works as intended.
> >
> > --Alaina
> > _______________________________________________
> > users mailing list
> > [email protected]
> > http://lists.xwiki.org/mailman/listinfo/users
> >
>
>
>
> --
> Thomas Mortagne
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to