Gossamer Forum
Home : Products : DBMan : Customization :

Only Modify the Records that you make???

Quote Reply
Only Modify the Records that you make???
Does anyone know how to set this script up so that a person can only modify/delete the scripts that they themselves input?

I have so many different users, and I want them to only be able to tamper with there own...

Thanks again!

Greg
Quote Reply
Re: Only Modify the Records that you make??? In reply to
This should be very simple to do, as it seems that the script is designed to do so... but, as always, it is not working for me. Maybe it is just something really small, but I do not know what it is.

So if you can help me, I would really appreciate it.

This is what I have in my "Authorization Options" Section:

Code:
# 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 = 0;

# 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;
Quote Reply
Re: Only Modify the Records that you make??? In reply to
The best thing to do is assign the db_key to the Userid field.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Only Modify the Records that you make??? In reply to
I read a post on that, but I am not an expert on Perl. Could you explain this a little bit more. Thanks Elliot.

Greg
Quote Reply
Re: Only Modify the Records that you make??? In reply to
Hi Greg,

You don't need Perl to enable what Eliot suggests.

Look in your .cfg file, immediately after the database definition. You'll see something like
Code:
# The column name for the database key. Can be any column, but it must be unique!
# You can't have two records with the same key value!
$db_key = 'ID';
# Track the key? Should DBMan keep a counter of the next key to use? This isn't
# neccessary if you can guarantee that your entry in the key field will be unique
# (i.e. a userid).
$db_key_track = 1;

You should make sure that
Code:
$auth_user_field = 1
now refer to the same field

Fred
Quote Reply
Re: Only Modify the Records that you make??? In reply to
Fred,
I have modified it so in the way that you have said, and it is still not working...

Here is the way I have things set.

Code:
$db_key = 'ID';
$db_key_track = 1;
$auth_user_field = 1;

Is there something that I just don't get?
Quote Reply
Re: Only Modify the Records that you make??? In reply to
I am brain dead... For some reason that was just not clicking in my head!!!

Thanks for the help

Greg
Quote Reply
Re: Only Modify the Records that you make??? In reply to
I got that working, but it created a new problem... Please check out my new post at:

http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/001306.html