|
From: shane <sh...@lo...> - 2001-09-18 01:53:49
|
At 04:52 PM 9/17/2001 -0700, wa...@Ry... wrote:
>All,
>
>Please excuse me if this is a FAQ, but I'm a newbie and simply can't find
>the information I'm looking for.
>
>Does Slashcode already have a pre-existing feature to require users to be
>logged in to be able to view particular content? For example, if I had a
>particular section I would like to restrict to logged in users only, is
>there a way in the stock slashcode that would enforce this.
>
>I'm not looking for iron-clad security (although I'll take it if it's
>there.) I'm mostly looking for something so that an anonomous user
>wouldn't know about the existance of certain URL's.
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:
ie:
#locksomeone out who's seclev is too low
my $user = getCurrentUser();
redirect('/users.pl') if (($user->{is_anon}) || ($user->{seclev}<5));
#locksomeone out who doesn't have a particular user's param
my $user = getCurrentUser();
redirect('/users.pl') 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.
Shane
|