Hi. I want to know if it is possible to set it up so that users must register to add a record to the database. Then they may only create one record under that account. They should be able to modify that one record, but not add other records. Anyone know how to do this? (...Or even understand me?)
Feb 24, 2000, 3:33 PM
Veteran (17240 posts)
Feb 24, 2000, 3:33 PM
Post #2 of 10
Views: 3678
Go to the following web site and read about User Permissions:
www.jpdeni.com/dbman/
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
[This message has been edited by AnthroRules (edited February 24, 2000).]
www.jpdeni.com/dbman/
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
[This message has been edited by AnthroRules (edited February 24, 2000).]
Feb 25, 2000, 12:54 PM
User (59 posts)
Feb 25, 2000, 12:54 PM
Post #3 of 10
Views: 3665
I still can't figure it out. I read the tutorial and have tried all kinds of different permissions. Here's what I have currently:
$auth_logging = 1;
$auth_allow_default = 1;
@auth_default_permissions = (1,0,0,0,0);
$auth_signup = 1;
@auth_signup_permissions = (1,1,0,1,0);
$auth_modify_own = 1;
$auth_view_own = 0;
$auth_user_field = 1;
Is there somewhere else I should be looking to get this right..or is the answer right here in the permissions.
[This message has been edited by xev (edited February 25, 2000).]
[This message has been edited by xev (edited February 25, 2000).]
$auth_logging = 1;
$auth_allow_default = 1;
@auth_default_permissions = (1,0,0,0,0);
$auth_signup = 1;
@auth_signup_permissions = (1,1,0,1,0);
$auth_modify_own = 1;
$auth_view_own = 0;
$auth_user_field = 1;
Is there somewhere else I should be looking to get this right..or is the answer right here in the permissions.
[This message has been edited by xev (edited February 25, 2000).]
[This message has been edited by xev (edited February 25, 2000).]
Feb 25, 2000, 1:03 PM
Veteran (17240 posts)
Feb 25, 2000, 1:03 PM
Post #4 of 10
Views: 3666
It is in the permissions that you must get this to work!
Use the following permissions:
# 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 = (0,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,0,0,0;
# 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 = 0;
You will have to change the $auth_user_field to the number of your Userid field in the default.cfg file.
Best of luck.
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Use the following permissions:
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 = 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 = (0,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,0,0,0;
# 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 = 0;
You will have to change the $auth_user_field to the number of your Userid field in the default.cfg file.
Best of luck.
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Thanks, but that didn't work. I guess this database just isn't set up to work like that. See, I want to have a database of gaming guilds. New guilds should be able to register their guild to the database, and then later if they want, modify it. There is no reason someone would register more than one guild under a login, so I need to limit them to one record. It seems so simple, but I guess it's not!
[This message has been edited by xev (edited February 25, 2000).]
[This message has been edited by xev (edited February 25, 2000).]
Ok, here's my "dream" of how I want it to work. Visitors can search the database without logging in. New guilds can add their guild to the database by simply clicking add guild. On the add guild form, they will have username and password along with all the other fields. Then they click add and thats it! They can later come pack and modify their guild with the id and pass they used when adding it. Cool huh? ... Now all I have to do is find out how to do it! hehe
Feb 25, 2000, 2:42 PM
Veteran (17240 posts)
Feb 25, 2000, 2:42 PM
Post #7 of 10
Views: 3683
Uh...the codes I gave you do the following:
1) Users login to create ONE record
2) Users can delete and modify their OWN record.
To link to the database WITHOUT LOGGING in you use the following codes AS STATED numerous TIMES in the DBMAN Forums and in the README FILE:
Best of luck!
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
1) Users login to create ONE record
2) Users can delete and modify their OWN record.
To link to the database WITHOUT LOGGING in you use the following codes AS STATED numerous TIMES in the DBMAN Forums and in the README FILE:
Code:
<a href="http://www.mydomain.com/cgi-bin/dbman/db.cgi?db=default&uid=default">Search Database</a>Best of luck!
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Feb 25, 2000, 6:27 PM
Veteran (17240 posts)
Feb 25, 2000, 6:27 PM
Post #9 of 10
Views: 3672
Well, if the permissions I gave you do not work...Simply delete the Add a Record Link from the html_footer file and also in the html_home sub-routines.
Then add the following codes in your html_home sub-routine:
%rec = &get_record($db_userid);
unless ($rec{$db_key}) {
&html_add_form;
return;
}
}
Regards,
Regads,
------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Then add the following codes in your html_home sub-routine:
Code:
if ($per_add) { %rec = &get_record($db_userid);
unless ($rec{$db_key}) {
&html_add_form;
return;
}
}
Regards,
Regads,
------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums