On Jun 5, 2012, at 2:47 PM, Thomas Mortagne wrote:
On Tue, Jun 5, 2012 at 2:04 PM, Andreas Jonsson
<aj(a)member.fsf.org> wrote:
+0
Wouldn't it be a cleaner solution if we instead add a method to the document
model bridge for getting the document author?
It's the same, IMO adding more things in the document model bridge
which is temporary and even worst than the "old" model API should be
avoided as much as possible. Wiki macro already have it's own model
bridge so the cleanest is to use it IMO.
Well right now our official strategy (i.e. voted) is to use the model bridge.
IMO if we want to stop using this strategy officially someone should propose a mail about
it. At least to clarify because some modules have started having their own bridge without
a real official strategy defined so the situation is far from clear ATM.
Now the problem with individual bridges is that you have a lot of duplication.
For example if another module requires what you have added to the wikimacro model bridge
then that other module will need to duplicate your code. We need to decide is that's
ok or not.
Personally I prefer to add stuff to the model bridge. There's the issue with backward
compatibilty though to think about...
Thanks
-Vincent
> Best Regards,
>
> /Andreas
>
>
> On 2012-06-05 12:05, Thomas Mortagne wrote:
>>
>> Hi devs,
>>
>> Despite what the documentation is saying anyone can register a wiki
>> macro for the whole wiki so I'm about to fix it. See
>>
http://jira.xwiki.org/browse/XWIKI-7880.
>>
>> But to fix it properly IMO I need to add a right checking method to
>> the wikimacro/oldcore own bridge.
>>
>> Right now the right check is a pile of hacks using various APIs
>> (WikiModel for edit, DocumentAccessBridge for programming) and there
>> is no way to test admin right in existing bridges and APIs anyway.
>> Instead of adding more hacks to the current wiki macro right checking
>> I find it better to move the check itself to its existing own model
>> bridge and test it there using the rightservice directly. It also make
>> more sense to have this check at the wiki macro model bridge level
>> than the wiki macro component itself.
>>
>> This is a pretty hidden API that noone is supposed to use except the
>> wiki macro and oldcore but since it's a public interface it makes
>> CLIRR complains so according to our rule here is the vote for adding
>> this new method.
>>
>> WDYT ?
>>
>> Here is my +1.
>>
>> Since the master is now on 4.2 branch I'm committing it right now.
>> Will revert it if anyone gives a veto.