Apache-UploadSvr
view release on metacpan or search on metacpan
lib/Apache/UploadSvr.pm view on Meta::CPAN
=head1 CONFIGURATION
httpd.conf:
PerlSetVar Auth_DBI_data_source dbi:mSQL:authen
PerlSetVar Auth_DBI_pwd_table usertable
PerlSetVar Auth_DBI_grp_table grouptable
PerlSetVar Auth_DBI_uid_field user
PerlSetVar Auth_DBI_grp_field group
PerlSetVar Auth_DBI_pwd_field password
PerlSetVar stageuri /STAGE
PerlSetVar Apache_UploadSvr_Usermgr "Apache::UploadSvr::User"
PerlSetVar Apache_UploadSvr_myuri /perl/user/up
PerlSetVar Apache_UploadSvr_transdir /usr/local/apache/trans
PerlSetVar Apache_UploadSvr_trashdir /usr/local/apache/trash
<Files "...">
PerlSetVar DirCache .dircache
SetHandler perl-script
lib/Apache/UploadSvr/User.pm view on Meta::CPAN
CREATE TABLE usertable (
user CHAR(12) NOT NULL PRIMARY KEY,
email CHAR(64),
firstname CHAR(32),
lastname CHAR(32),
fullname CHAR(64),
salut CHAR(4),
lastlogin CHAR(10),
introduced CHAR(10),
password CHAR(13),
changedon CHAR(10),
changedby CHAR(10)
)
C<user> corresponds to the username with which the users identify
in the authentication stage. C<email> is their email address where
the transaction tickets are delivered to. C<lastname> is their family name.
<fullname> is whatever the fullname is composed of in the local culture.
C<salut> is the salutation like C<Herr> or C<Mister>. C<lastlogin>
is the timestamp that is updated with every request. C<introduced> is
the timestamp when the user got registered (not used in this uploadserver).
C<password> is the crypted
password in the default upload server. If the authentication handler
uses a different table, then this field is not needed. C<changedon>
and C<changedby> are not used in this application, they are only used as
interesting facts for the administrator.
CREATE TABLE perms (
user CHAR(12),
permitted CHAR(32)
)
This table has a 1 to N mapping of users to directories they
lib/Apache/UploadSvr/User.pm view on Meta::CPAN
The constructor -E<gt>new takes as a single argument an
Apache::UploadSvr object and returns an object that has the
above described fields as object attributes. The attribute C<permitted>
is computed from the C<perms> table so that its value is an anonymous
list of the directories the user has write permission to. A typical
structure of such an object would be:
bless( {
'introduced' => 875601758,
'password' => 'rtthXtbR5tjit',
'fullname' => 'Andreas J. König',
'changedby' => 'andreas',
'lastname' => 'König',
'changedon' => 875601758,
'email' => 'k',
'firstname' => 'Andreas',
'salut' => 'Herr',
'lastlogin' => '0903739665',
'permitted' => [
'/'
( run in 1.144 second using v1.01-cache-2.11-cpan-49f99fa48dc )