I've written my first module - woohoo! It's for Drupal 4.6
and allows a
degree of protection to node pages. The object is to
restrict access to
node content to people who know a password. There is no
concept of users
or other such complications, it just comes down to "if
you know the
password you get to see the content, otherwise you
don't."
I intend to use this to protect the price list page on an
otherwise
completely public website - anyone who wants the price list
has to email
me asking for the password (thereby introducing themselves
to me and
declaring their interest in my products).
I was looking for some peer review of my code. It's based
on the
page.module code and is fairly short - most of it is
"comments to self"!
It's here:
http://www.derekfountain.org/misc/passwordpage.module
It's not supposed to be highly secure, and there are plenty
of features
I could add to make it more generally useful. At this stage
I'm just
looking for feedback on my Drupal API skills - am I doing it
right or am
I missing techniques I should know about? Have I done
anything stupid or
missed something obvious?
The code is GPLed, of course, so help yourself if it's
useful to you.
--
<a href="http://www.derekfountai
n.org/">Derek Fountain</a> on the web at
http://www.derekfountai
n.org/
|