Gossamer Forum
Home : Products : DBMan : Customization :

Need help on viewing specific records in DBMan

Quote Reply
Need help on viewing specific records in DBMan
Currently I have auth set so that when a user logs in they only can view (and then modify, delete, etc) their own records. This is what I want for the users who need to work on their records they own in the database. I do this because I only want those who added a record to my database to only see their own records when they do a "list all".

However, I also want others/anyone to view all and any records in the database when they do a search/view (without needing a password/userID.

I want to be able to send a specific search.cgi? command to DBMan so it will let anyone view/search the database without a login permissions.

Specifically, I want to be able to send a command like:
dbm_db.cgi?view_records=1&Category=auto/magazines

So the search results only displays all records in a specific category. However, when I try this (because of my auth settings for the login users) I am forced to the login screen.

Any ideas on how I can do this without creating a mod (or is there already a mod for this?)

TimRyan
Quote Reply
Re: Need help on viewing specific records in DBMan In reply to
You could go about your "List All" thing differently.

In sub html_footer, change the "List All" line to be:

Code:
if ($db_userid eq "default") {
print qq!| <A HREF="$db_script_link_url&view_records=1&
$db_key=*">List All</A> ! if ($per_view);
}
else {
print qq!| <A HREF="$db_script_link_url&view_records=1&
$db_cols[$db_key_pos]=$db_userid">List All</A> ! if ($per_view);
}

If you want admins to be able to see everything when they do a "List All", change the first line to

Code:
if ($db_userid eq "default" or $per_admin) {

This is a whole lot easier than trying to circumvent permissions.


------------------
JPD







[This message has been edited by JPDeni (edited August 19, 1999).]
Quote Reply
Re: Need help on viewing specific records in DBMan In reply to
Thanks JPD,
I will digest what you have shared and try it out. Smile
TimRyan