I know, but I included this page in my Conception.WebHome :
#includeInContext("Main.Dashboard")
The Dashboard allows me to see the recent changes for the current space, the
tags in the current space and, normally, the documents in the current space.
By the way, I can see the Conception documents when logged as admin.
--
Gwen
2009/8/4 Guillaume Lerouge <guillaume(a)xwiki.com>
Hi Gwenhaël,
On Tue, Aug 4, 2009 at 4:25 PM, Gwenhaël CORAY <akiramobsk(a)gmail.com>
wrote:
Thank you for your answer.
The logs show me several thousands of lines and I don't understand where
I
can find the information.
There, an example of the lines I get :
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Searching for
matching
rights at group level
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Searching for
matching
rights for 2 groups: [xwiki:XWiki.XWikiAllGroup, xwiki:XWiki.Conception]
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking right:
xwiki:XWiki.XWikiAllGroup,Conception.WebPreferences,view,false,true,true
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking objects 7
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking object 0
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking match:
view
in view,comment
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Found a right for
true
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking match:
> xwiki:XWiki.XWikiAllGroup in XWiki.XWikiAllGroup
> 2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking match:
> xwiki:XWiki.XWikiAllGroup in XWiki.XWikiAllGroup
> 2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Found matching
right
in XWiki.XWikiAllGroup for XWiki.XWikiAllGroup
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Access has been
granted for (xwiki:XWiki.gco,Conception.Outils,view): web level
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- hasAccessLevel for
view, xwiki:XWiki.gco, Conception.Outils
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking right:
xwiki:XWiki.gco,XWiki.XWikiPreferences,admin,true,true,true
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking objects 3
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking object 0
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking match:
admin
in admin,edit,undelete,
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Found a right for
true
2009-08-04 15:00:41,776 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking match:
> xwiki:XWiki.gco in
> 2009-08-04 15:00:41,777 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking match:
> xwiki:XWiki.gco in
> 2009-08-04 15:00:41,777 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Failed match:
xwiki:XWiki.gco in
2009-08-04 15:00:41,777 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking object 1
2009-08-04 15:00:41,777 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking match:
admin
in view,edit,comment,register,undelete,
2009-08-04 15:00:41,777 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking object 2
2009-08-04 15:00:41,777 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking match:
admin
in view,register,
2009-08-04 15:00:41,777 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Searching for
matching
rights at group level
2009-08-04 15:00:41,777 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Searching for
matching
rights for 2 groups: [xwiki:XWiki.XWikiAllGroup, xwiki:XWiki.Conception]
2009-08-04 15:00:41,777 [
http://localhost:8080/xwiki/bin/view/Conception/]
[http-8080-1] DEBUG xwiki.XWikiRightServiceImpl
- Checking right:
xwiki:XWiki.XWikiAllGroup,XWiki.XWikiPreferences,admin,false,true,true
Conception is the space wich I want to see the documents.
gco is a user who is in two groups : XWikiAllGroup and Conception.
XWikiAllGroup has view and comment rights on all documents and Conception
group has view, comment, edit and delete rights on documents of the space
Conception.
--
Gwen
2009/8/4 Sergiu Dumitriu <sergiu(a)xwiki.com>
gwenhaelc wrote:
> Hello,
>
> I have a problem with the hasAccessLevel() method.
>
> I want to list all the documents existing in a space, including the
page
> Main.Dashboard.
Just a quick check: The "Main.Dashboard" page is located in the
"Main"
space
(the "." is the delimiter between spaces and pages in XWiki) so you'll
never
see it in the list of documents in the "Conception" space.
Guillaume
As nothing appear in the "Documents in
space", I try to
> list
> > the documents with this code :
> >
> >
> > #set($docNames = $xwiki.getSpaceDocsName($doc.space))
> >
> > <ul>
> > #foreach($doc in $docNames)
> > #if($xwiki.hasAccessLevel("view", $context.user, $doc))
> > <li>$doc</li>
> > #end
> > #end
> > </ul>
> >
> > Regarding to his group rights, the user has the "view" right on the
> space,
> > as this right is checked in rights management.
> > By the way, he can access the document.
> >
> > But, documents are not listed. $xwiki.hasAccessLevel("view",
> $context.user,
> > $doc) returns false.
> >
> > Only admins in the XWikiAdminGroup can view the list.
> >
> > Have you some ideas ?
>
> Can you enable debug logging for the authorization part?
>
> Extract log4j.properties from WEB-INF/lib/xwiki-core-M.N.jar into
> WEB-INF/classes/ and append to it:
>
> log4j.logger.com.xpn.xwiki.user=debug
>
> Then restart the container, and calls to hasAccessLevel should report
in
the log
why was the right denied.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Guillaume Lerouge
Product Manager - XWiki
Skype: wikibc
Twitter: glerouge
http://guillaumelerouge.com/
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users