Welcome to Geeklog Monday, August 19 2019 @ 12:49 pm EDT

Geeklog Forums

Page Displayed to Unregistered Users Only


Status: offline

johnjr

Forum User
Chatty
Registered: 08/02/04
Posts: 68
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

Status: offline

jmucchiello

Forum User
Full Member
Registered: 29/08/05
Posts: 985
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.

Status: offline

johnjr

Forum User
Chatty
Registered: 08/02/04
Posts: 68
Ok. But will the static page admins, or the 'owner' of this static page still be able to edit it?

John

Status: offline

jmucchiello

Forum User
Full Member
Registered: 29/08/05
Posts: 985
Anyone with staticpages.edit can edit it whether they are the owner or not.

Status: offline

johnjr

Forum User
Chatty
Registered: 08/02/04
Posts: 68
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

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
The Edit permissions only come into play when a user has one of the matching .edit rights (staticpages.edit, etc.).

bye, Dirk

Status: offline

johnjr

Forum User
Chatty
Registered: 08/02/04
Posts: 68
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

Status: offline

jmucchiello

Forum User
Full Member
Registered: 29/08/05
Posts: 985
Quote by: Dirk

The 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.

Status: offline

johnjr

Forum User
Chatty
Registered: 08/02/04
Posts: 68
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

Status: offline

jmucchiello

Forum User
Full Member
Registered: 29/08/05
Posts: 985
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.

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: jmucchiello

Having 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

Status: offline

johnjr

Forum User
Chatty
Registered: 08/02/04
Posts: 68

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

Status: offline

jmucchiello

Forum User
Full Member
Registered: 29/08/05
Posts: 985
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.

All times are EDT. The time is now 12:49 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content