Hi Sonic,

On 17 Feb 2016 at 15:00:24, Sonic 
(timurale...@gmail.com(mailto:timurale...@gmail.com)) wrote:

> Hi. I have Highlight macros that doesn't work for users without admin and
> programmers rigths.
>  
> How I use this macro:
> {{highlight language="php" style="monokai"}}
> /public function updateSystemStatus()
> {
> $articules = Articules::where('system_status_id', 5)->get();
> foreach($articules as $articul){
> Status::updateEntitySystemStatus([
> 'entity' => 'articul',
> 'object' => $articul,
> ]);
> $articul->save();
> }
> return 'OK';
> }
> {{/highlight}}/
>  
> Here is what I see as admin in the page's source code:
>  
>  
> And what I see as a user:
>  
>  
> Console output:

I’ve tested your code snippet on XWiki 7.4.1 and it works fine. This macro 
doesn’t need the user to be admin nor have programming rights! Why do you think 
it requires that?

Here’s what I get visually:
https://www.evernote.com/l/AHdARxrg9XhNsJ1SwJY6P6ub96UPiRpDAzA

Thanks
-Vincent

PS: BTW you have an extra “/“ after {{/highlight}} which will make the macro 
fail…

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to