Re: [xwiki-users] Failed to load resource: the server responded with a status of 403 (Forbidden)

2016-02-17 Thread Sonic
Thanks all for help.
*Eduard Moraru*
Yes, it was just a problem with rights. Nothing with the extension.
The Space Macros' view right for XWikiAllGroup was forbidden.
So only XWikiAllGroup' users with admin/programming rights could see
highlighting code.




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Failed-to-load-resource-the-server-responded-with-a-status-of-403-Forbidden-tp7598013p7598027.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Failed to load resource: the server responded with a status of 403 (Forbidden)

2016-02-17 Thread Eduard Moraru
Hi Sonic,

Maybe you have done some rights configuration that you did not intend to.

Can a regular user (not admin) access in view mode the page
Macros/Highlight? If not, then have a look at the rights of the page, at
the rights of the space and even at the rights of the wiki. Having a look
at your groups and the rights given to the groups would not hurt either.

If you want to be extra sure that the problem is fro your configuration and
not coming from the application itself, grab a fresh copy of XWiki 7.1.4
(same version as you have), install the macro, create a regular user, log
in with that user and check if you care reproduce the issue. If you can`t
then, as I said, you really need to look well into your rights setup.

Hope this helps,
Eduard

P.S.: I have not tried the macro myself yet, just doing guesswork here.

On Wed, Feb 17, 2016 at 4:45 PM, Sonic  wrote:

> Hi, vmassol
> When I give admin and/or programming rights for whole xwiki to user, macro
> works well. When I take it back, macro doesn't work. And this message:"the
> server responded with a status of 403 (Forbidden)"
> This is why I think that.
> Maybe something wrong with my Xwiki configuration?
> And my xwiki version is older - 7.1.4.
>
>
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Failed-to-load-resource-the-server-responded-with-a-status-of-403-Forbidden-tp7598013p7598018.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> 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


Re: [xwiki-users] Failed to load resource: the server responded with a status of 403 (Forbidden)

2016-02-17 Thread Sonic
Hi, vmassol
When I give admin and/or programming rights for whole xwiki to user, macro
works well. When I take it back, macro doesn't work. And this message:"the
server responded with a status of 403 (Forbidden)"
This is why I think that.
Maybe something wrong with my Xwiki configuration?
And my xwiki version is older - 7.1.4.





--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Failed-to-load-resource-the-server-responded-with-a-status-of-403-Forbidden-tp7598013p7598018.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Failed to load resource: the server responded with a status of 403 (Forbidden)

2016-02-17 Thread vinc...@massol.net
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


[xwiki-users] Failed to load resource: the server responded with a status of 403 (Forbidden)

2016-02-17 Thread Sonic
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:
 




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Failed-to-load-resource-the-server-responded-with-a-status-of-403-Forbidden-tp7598013.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users