Gossamer Forum
Home : Products : DBMan : Customization :

Userid in .pass and not db file

Quote Reply
Userid in .pass and not db file
Hi,

I was trying to do the following but went into error in the permission settings :

Using JPDeni change password/email and signup mod, a user signup and the Userid, password and email are stored in the .pass file.

However, I have two .db(default and business), .conf(default and business) and html.pl(html.pl and business.pl) sharing one default.pass.

The default html.pl is for signup, login, retrival password and change email. All the sub for add,view, modify and delete have been set to unknown action as the link to the business.db has been set in the sub homepage. Therefore the default.db is actually not used in this case only the default.pass.

As for the business.pl (html) is for adding, deleting, viewing and editing the data posted by user. I am setting it this way as I will be setting up several other db, conf and html files later. The login, homepage and change password/email sub have been changed to return an unknown action.

I need the following permisssion for -
Admin : All
Registered user : modify, edit own records only
Default : view all records only

Below is the permission in my default and business conf

# Authorization Options
# --------------------------------------------------------
# No Authentication? (1 = "there is no authentication", 0 = "there is authentication")
# If you choose no authentication, then set the permissions of what
# people can do with: @auth_default_permissions below.
$auth_no_authentication = 0;

# The amount of time in seconds that user files are kept in the
# auth directory before the program removes them. 2-6 hours is
# probably a good value.
$auth_time = 21600; # 6 hours (in seconds)

# Enable (1) or disable (0) logging.
$auth_logging = 1;

# Allow a default user? This means you can specify a user via the URL
# and skip the logon process. Use this to allow people to search without
# logging on, but require log in if they want to add/modify/remove etc.
# (1 = "yes", 0 = "no")
$auth_allow_default = 1;

# Default permissions used if there is no authentication, or for a default
# user. (View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (1,0,0,0,0);

# Allow people to sign up for their own userid/passwords? They will
# recieve default permissions.
$auth_signup = 1;

# Permissions a new signup should get.
@auth_signup_permissions = (1,1,1,1,0);

# Registered users: can modify/delete _only_ own records. For this to make
# sense you should set default off or to 1,0,0,0.
$auth_modify_own = 1;

# Registered users: can view _only_ own records. For this to make sense
# you should turn off default permissions.
$auth_view_own = 0;

# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = -1;

# This is the field position in the database used for storing
# the email address of the one who owns the record. Set to -1 if not
# used.
$auth_email_field = -1;
------------------------------------------------
Here goes the problem.

Since the Userid is stored in the .pass file. I have set the business.conf $auth_user_field to -1. (including the default.conf) No error but editing a record show No matching records. What should I do in this case to set the above permission.

I know the problem is with the $auth_user_field only. Editing , modifying and deleting show no problem but the permission was incorrect.

Please help !!!