Slash Boxes

Slash Open Source Project

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login
Loading... please wait.
  • Ah, you didn't look at the listserv archives []:
    [Slashcode-general] Requiring Login? []
    lottadot []
    • by acs (1437) on Tuesday September 25 2001, @04:32AM (#3389) Homepage Journal
      Ops, I miss this question in the list :(

      OK, the solutions that shane gives in the list were:

      First by shane

      Any section rendered to .shtml, you can't stop people from viewing (unless you lock out the directory via apache, which slash doesn't inherently do).
      From a perl script you can lock people out:

      #locksomeone out who's seclev is too low
      my $user = getCurrentUser();
      redirect('/') if (($user->{is_anon}) || ($user->{seclev} #locksomeone out who doesn't have a particular
      user's param

      my $user = getCurrentUser();
      redirect('/') if !defined $user->{'someparam'};

      etc etc. there's probably add'l ways to do it, some more efficient then others. but this should give you somewhere to look into further.

      Second by shane

      Also, there is yet another way to lock people out, and this (imho) is pretty cool.

      You write your own apache handler to lock people out who don't have a specific cookie.

      At first this sounds horrific, but if you look at the Slash code, they've already done 95% of the work for you with their Index Handler code.

      I've got one that locks out a whole directory if the user isn't logged in. But you could expand on it pretty easily.

      If anyone wants it I'll put a tarball up.