Posted on: 08/17/07 09:38pm
By: johnjr
I need to display an 'intro' page (static page?) to people who come to my website, but who have not been registered as users yet (and are not logged in). But I do not want this page displayed to users who are logged in).
I've tried setting different permissions on the 'intro' static page displayed, but the best that I can come up with is that the 'intro' page is displayed to 'non registered' users, it is not displayed to 'logged in' users, which is what I want.....but, this 'intro' page is also displayed to the 'static page admin', too, which I don't want.
Is there any way to get the page to display ONLY to 'non registered/non logged-in' users, but will NOT display to any 'logged in' user (including static page admins)?
John
Re: Page Displayed to Unregistered Users Only
Posted on: 08/17/07 10:09pm
By: jmucchiello
uncheck all the permissions except Anonymous. Set the static page to entire page. Leave on left blocks but in the blocks editor turn off all access to blocks from anonymous EXCEPT for the "user functions" block or else you won't be able to log in.
Re: Page Displayed to Unregistered Users Only
Posted on: 08/17/07 10:13pm
By: johnjr
Ok. But will the static page admins, or the 'owner' of this static page still be able to edit it?
John
Re: Page Displayed to Unregistered Users Only
Posted on: 08/17/07 10:28pm
By: jmucchiello
Anyone with staticpages.edit can edit it whether they are the owner or not.
Re: Page Displayed to Unregistered Users Only
Posted on: 08/17/07 10:42pm
By: johnjr
Thanks! I tried it and it did indeed work exactly as I needed it to work.
It's a bit confusing where there are the checkboxes for 'Edit' at the bottom of the page where static pages are created. It makes it appear that those have to be checked in order to allow the owner and/or static page admins to edit the page. But, obviously, that is not the case.
So, what do those 'Edit' checkboxes allow for?
John
Re: Page Displayed to Unregistered Users Only
Posted on: 08/18/07 02:54am
By: Dirk
The Edit permissions only come into play when a user has one of the matching .edit rights (staticpages.edit, etc.).
bye, Dirk
Re: Page Displayed to Unregistered Users Only
Posted on: 08/18/07 08:35am
By: johnjr
I'm very confused now...
jmucchiello stated: "Anyone with staticpages.edit can edit it whether they are the owner or not."
But is this only true IF the Edit box is checked for a given static page?
But the owner can always edit his/her static pages, whether the Edit box is checked or not?
John
Re: Page Displayed to Unregistered Users Only
Posted on: 08/18/07 12:32pm
By: jmucchiello
Quote by: DirkThe Edit permissions only come into play when a user has one of the matching .edit rights (staticpages.edit, etc.).
bye, Dirk
Dirk, that is very inconsistent in Geeklog. Look at the 1.4.1 /public_html/admin/plugins/staticpages/index.php file. It checks up front that you have the staticpages.edit feature. Once you get that far, you can do anything to a staticpage regardless of the state of the permissions array. In $mode == 'delete' there isn't a single SEC_ call.
Re: Page Displayed to Unregistered Users Only
Posted on: 08/19/07 11:01am
By: johnjr
Ok, so now I'm really confused. Can someone explain how it DOES work, not how it's SUPPOSED to work? And, I would then suggest that this part of the code be re-written to make it easier to use (more intuitive).
John
Re: Page Displayed to Unregistered Users Only
Posted on: 08/19/07 12:43pm
By: jmucchiello
Having staticpages.edit is all you need to edit any staticpage. The owner/group edit permissions do nothing. The owner/group read permissions allow/prevent read access correctly. As do the member/anonymous read permissions.
Re: Page Displayed to Unregistered Users Only
Posted on: 08/19/07 01:15pm
By: Dirk
Quote by: jmucchielloHaving staticpages.edit is all you need to edit any staticpage. The owner/group edit permissions do nothing.
That's not correct. The group permissions work just as they should. If you're not in the group that owns a static page and the "Group E" checkbox is not checked, then you can not edit the static page. Try it out.
You are correct with your earlier statement about the missing check for staticpages.delete permissions. That's a bug and has since been fixed in CVS.
bye, Dirk
Re: Page Displayed to Unregistered Users Only
Posted on: 08/19/07 05:19pm
By: johnjr
Dirk said: "If you're not in the group that owns a static page and the "Group E" checkbox is not checked, then you can not edit the static page."
So, if a user's permissions are set to include the group that 'owns' a static page, then it doesn't matter whether the "Group E" checkbox is checked or not....if this user is a static page admin, then he/she can edit this static page... correct?
John
Re: Page Displayed to Unregistered Users Only
Posted on: 08/19/07 06:00pm
By: jmucchiello
I know what it is that's confusing this. If you are in the ROOT group, your access rights are automatically set to 3 no matter what the object is: staticpages, events, whatever.