Discussion:
[xwiki-users] private wiki with public front page
Hugo Ahlenius
2013-11-04 08:27:51 UTC
Permalink
Hi,

I have just started using XWiki, which I have deployed under Tomcat on my Ubuntu server. It seems to work ok, and I have been able to edit and add pages.

Now I have set everything to require registration - so I added the XWikiGuest user, and blocked all stuff - which seem to work great.

Now I would have added one page, and I would like this page to be viewed by unregistered users (e.g. the general public). So I added the "View" permissions for this page for unregistered users/XwikiGuest - but somehow it doesn't work - when trying to view this page while not signed in, I am still 302'ed to the registration/login page!

Any tips on how to solve this?

Thanks!

Regards,
Hugo



--
Hugo Ahlenius

-------------------------------------------------------------
Hugo Ahlenius E-Mail: hugo.ahlenius(at)nordpil.com
Phone: +46 75 7575284
Nordpil Mobile: +46 733 467111
http://nordpil.com Skype: callto:hugo.ahlenius
Twitter: https://twitter.com/nordpil

vCard: http://nordpil.com/hugoahlenius.vcf
-------------------------------------------------------------
Clemens Klein-Robbenhaar
2013-11-04 10:10:16 UTC
Permalink
Hi Hugo,
Post by Hugo Ahlenius
Hi,
I have just started using XWiki, which I have deployed under Tomcat on my Ubuntu server. It seems to work ok, and I have been able to edit and add pages.
Now I have set everything to require registration - so I added the XWikiGuest user, and blocked all stuff - which seem to work great.
Now I would have added one page, and I would like this page to be viewed by unregistered users (e.g. the general public). So I added the "View" permissions for this page for unregistered users/XwikiGuest - but somehow it doesn't work - when trying to view this page while not signed in, I am still 302'ed to the registration/login page!
Any tips on how to solve this?
I guess what you did is set the (black) checkbox to "Prevent unregistered users from viewing pages, regardless of the page or space rights".
In that case setting up view rights on certain pages to make them viewable for the public does not work (it is exactly the purpose of that check to avoid this happening by accident)

If you want to hide most pages to the anonymous user, you need to "uncheck" the green "view" right checkbox for "Unregistered Users" in the wiki admin.
This can be overriden on the page level, exactly in the way you did it.

Not sure if I guessed right .... I hope it helps anyway
Clemens
Hugo Ahlenius
2013-11-04 13:49:45 UTC
Permalink
Post by Clemens Klein-Robbenhaar
If you want to hide most pages to the anonymous user, you need to
"uncheck" the green "view" right checkbox for "Unregistered Users" in the
wiki admin.
This can be overriden on the page level, exactly in the way you did it.
Thanks Clemens, that was the case, and lead me one step further. Now an unregistered user can see a page, but not the actual page content, only the heading and footer...

Regards,
Hugo


--
Hugo Ahlenius

-------------------------------------------------------------
Hugo Ahlenius E-Mail: hugo.ahlenius(at)nordpil.com
Phone: +46 75 7575284
Nordpil Fax: +46 8 6747020
http://nordpil.com Mobile: +46 733 467111
Skype: callto:hugo.ahlenius

vCard: http://nordpil.com/hugoahlenius.vcf
-------------------------------------------------------------
Hugo Ahlenius
2013-11-05 07:13:38 UTC
Permalink
Post by Hugo Ahlenius
Post by Clemens Klein-Robbenhaar
If you want to hide most pages to the anonymous user, you need to
"uncheck" the green "view" right checkbox for "Unregistered Users" in
the wiki admin.
This can be overriden on the page level, exactly in the way you did it.
Thanks Clemens, that was the case, and lead me one step further. Now an
unregistered user can see a page, but not the actual page content, only
the heading and footer...
To add to this - I just checked with firebug - a request for this one public page returns a number of 401 errors - for the CSS among other things, I think!

Regards,
Hugo


--
Hugo Ahlenius

-------------------------------------------------------------
Hugo Ahlenius E-Mail: hugo.ahlenius(at)nordpil.com
Phone: +46 75 7575284
Nordpil Fax: +46 8 6747020
http://nordpil.com Mobile: +46 733 467111
Skype: callto:hugo.ahlenius

vCard: http://nordpil.com/hugoahlenius.vcf
-------------------------------------------------------------
Clemens Klein-Robbenhaar
2013-11-05 08:53:04 UTC
Permalink
Post by Hugo Ahlenius
Post by Hugo Ahlenius
Post by Clemens Klein-Robbenhaar
If you want to hide most pages to the anonymous user, you need to
"uncheck" the green "view" right checkbox for "Unregistered Users" in
the wiki admin.
This can be overriden on the page level, exactly in the way you did it.
Thanks Clemens, that was the case, and lead me one step further. Now an
unregistered user can see a page, but not the actual page content, only
the heading and footer...
To add to this - I just checked with firebug - a request for this one public page returns a number of 401 errors - for the CSS among other things, I think!
That is probably because the pages containing the ColorThemes and such are not visible to the public.
Actually quite a lot of things in XWiki are just a page - this makes it easier to customize, but for the
mixed part public/part private setup you need to make several non-obvious pages public.

This includes:

Dashboard.WebHome - to display the Dashboard on the stat page
Main.Welcome - if using the "include welcome page" widget in the dashboard
XWiki.DefaultSkin - for the general layout configuration (see XWiki Admin, section "Presentation"
ColorThemes.DefaultColorTheme - or what ever color theme you are using - see e.g. localhost:8080/xwiki/bin/view/ColorThemes/

If you make these pages visible to the Anonymous user, do not forget to make the visible for the XWikiAllGroup, too,
as otherwise only the Anonymous user (and you as Admin) can see them, and normal registered users are locked out ...

Btw, you should see an error message right now like "failed to execute the include macro".
If you click in this you should get more info, including the stack trace and a longer error message;
this is quite useful most of the time

hope this helps
Clemens
-bt-
2013-11-08 14:45:44 UTC
Permalink
Thanks to clemens answer I was able to get my xwiki nearly like I want it.
At the moment I'm struggling regarding the search.
Here what I want to do and what I did already.

I want a wiki where I need to grant a user or group access to a
Space/Page/subwiki.
I removed all access rights from the groups and anonymous user.
So nobody can see anything.

As Clemens wrote I gave anonymous user and registered users access to
Dashboard Main.Welcome and Default skin.
But as soon as I want to search I get the error message
"...Current user [XWiki.XWikiGuest] doesn't have view rights on document
[xwiki:XWiki.SearchCode]..."
As long as I didn't gave anonymous view rights to space xwiki.
My problem is that than they get also access to all "global" pages etc.
I also try to gave anonymous users access only to the search page but this
doesn't work.

Have anyone a idea what I can try?

Best regards







--
View this message in context: http://xwiki.475771.n2.nabble.com/private-wiki-with-public-front-page-tp7587787p7587876.html
Sent from the XWiki- Users mailing list archive at Nabble.com.

Continue reading on narkive:
Loading...