On Sat, Mar 20, 2010 at 17:27, Thomas Mortagne <thomas.morta...@xwiki.com> wrote: > On Sat, Mar 20, 2010 at 16:46, Asiri Rathnayake > <asiri.rathnay...@gmail.com> wrote: >> 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
http://jira.xwiki.org/jira/browse/XWIKI-5031 >> >> >>> >>> 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 :( > > Using "sdoc" is not the solution and i would be -1 for it from scratch > but it's way better than using "doc" until we find a better way. > >> >> Thanks. >> >> - Asiri >> >> >>> >>> On Fri, Mar 19, 2010 at 16:20, Alaina <xw...@ursus.otherinbox.com> wrote: >>> > On Fri, Mar 19, 2010 at 7:52 AM, Asiri Rathnayake >>> > <asiri.rathnay...@gmail.com> 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 >>> > users@xwiki.org >>> > http://lists.xwiki.org/mailman/listinfo/users >>> > >>> >>> >>> >>> -- >>> Thomas Mortagne >>> _______________________________________________ >>> users mailing list >>> users@xwiki.org >>> http://lists.xwiki.org/mailman/listinfo/users >>> >> _______________________________________________ >> users mailing list >> users@xwiki.org >> http://lists.xwiki.org/mailman/listinfo/users >> > > > > -- > Thomas Mortagne > -- Thomas Mortagne _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users