Gossamer Forum
Home : Products : DBMan : Customization :

Two different user sign-up permissions

Quote Reply
Two different user sign-up permissions
I am trying to implement a resume database using the DBMan script. I would like to have two different sign-up forms, where the job-seeker will only have permissions to add, delete,view and/or modify his/her own record. I would also like to have a form where employers may sign-up for a username and password and they will be able to view all the resumes in the database. Is this possible to have two different sets of users sign-up with two different sets of permissions? Thanks for your help

Mike
Quote Reply
Re: Two different user sign-up permissions In reply to
Both aggregates/groups will be accessing the same database, right?

Well, what you could try doing is the following:

1) Make copies of the following files and directory:

a) /auth/
b) auth.pl
c) default.pass
d) default.log

to the following names:

a) /empauth/
b) empauth.pl
c) emp.pass
d) emp.log

2) Then create the following variables in your default.cfg file:

Code:
# Full path and file name of the employer authorization directory.
$emp_auth_dir = $db_script_path . "/empauth";

Code:
# Full path and file name of the employer password file.
$auth_emp_pw_file = $db_script_path . "/emp.pass";

Code:
# Full path and file name of the log file.
$auth_log_file = $db_script_path . "/emp.log";

3) Then you would have to add the following codes to your db.cgi:

Code:
require "empauth.pl"; # Authorization Routines

4) Then you would have to copy the sub admin_display routine in the db.cgi to something like sub emp_admin_display. You would have to change the variables in this new sub-routine to the variables you created in the default.cfg.

5) Add the following codes to your db.cgi file in the sub main routine:

Code:
elsif ($in{'emp_admin_display'}) { if ($per_admin) { &emp_admin_display; } else { &html_unauth; } }

6) Then in your html.pl file, copy the sub html_admin_display and create a new sub-routine, sub html_admin_emp_display. (Make sure that you change the &html_admin_display references in the sub emp_admin_display to this new sub-routine.)

Hope this makes sense. I know it may seem confusing. If you need help with the new sub-routines in html.pl and db.cgi, let me know.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




[This message has been edited by Eliot (edited November 05, 1999).]
Quote Reply
Re: Two different user sign-up permissions In reply to
Eliot, thanks for the help. I never thought about that technique.

What does sub admin_display in db.cgi do? I haven't implemented your changes yet, but I don't see where and how I can create to different sign-up and login forms for each group. There just seems like there is something missing. I'll try the changes you suggested and hopefully we can find some type of an answer.

Thanks for you help

Mike
Quote Reply
Re: Two different user sign-up permissions In reply to
Oops...You may also have to create separate login sub-routines in the html.pl file. The reason for the separate admin_display sub-routines is that it would be virtual impossible (and it would take a long time to write the appropriate codes and also download a long list of users) to have one admin display screen.

BTW: I have a Resume Database running on the following Site:

www.anthrotech.com/career/

If you would like to trade notes, let me know.

BTW: I have taken my email address off my signature file and profile configurations because I was getting sick and tired of individuals emailing me on an individual basis when their problems have already been answered in the Forums or could be answered on a group basis.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------