Gossamer Forum
Home : Products : DBMan : Customization :

False empty record

Quote Reply
False empty record
I hope I got this in the right area, but I am having a weird problem with DBMan which is being a bit contrary to track down. I wrote a secondary display feature for it and it works fine and displays the record just fine in the original format mode; as long as I am logged in as admin. If I log in as a guest, the original record format displays just fine, but when I click on the secondary display format, it is blank.

IE I am running a modified version of DBman as a genealogy program with 75 variables and it has been working just fine for close to 10 years (V2.04) and I recently wrote a mod for it to display the records in a 'tree' format and the mod reads the father's record, then reads the mother's record and displays their birth /death info on the page. well, all works well as long as I am in admin mode.

default perms are set at 1,0,0,0,0

record read format is: &getrecord('Father_Key'); etc

when I log in as a guest, the original display method works fine, but when I click on the 'tree view' the record is blank. I also found out that if I give the guest admin rights, (but no other rights except view), the record will display.

anybody have any recommendations? I will be playing with this some more tonight to see if I can beat it into submission.

Thanks in advance for any hints or tips anyone can give me...

Ted
Quote Reply
Re: [TedA] False empty record In reply to
Could it not be recognizing the "associated" records (such as the mother, child, etc.)? Could it be a 'view only own record' issue? Prolly not since the guest login works for part of it... if you wanna post the .cfg file and
the modified sub it may help.
Quote Reply
Re: [TedA] False empty record In reply to
I tracked the problem down to the variable...

($restricted = 1) if ($auth_modify_own and !$per_admin);

that is located inside the sub routine 'get_record'.

Once I set '$auth_modify_own' to a 0 (located inside the cfg file), it displays just fine. guess I ran into a minor glitch, but am still rather curious why get_record would lock down the display of the record.

course now that opens another can o' worms; any registered user can modify the contents of the database...

Am always open for feedback if someone has an opinion on this issue...

Quote Reply
Re: [Watts] False empty record In reply to
now you have me second guessing myself. I went into the cfg file again and checked it out and both those variables are next to each other, but am pretty sure it was the modify own and not view only own, but who knows, you may be right. it is functioning now and when i log in as guest or a new user, it displays correctly and have moved on to updating the pdf mod in it. this package has been in mothballs for a few years and have drug it out and started polishing it up for possible re release. Alex & Lois both remember me from 10 some years back, but I have been away admin'n domains and havent played too much with my own stuff...

Thanks for the feedback and hopefully other users will find this useful...

Ted
Quote Reply
Re: [Watts] False empty record In reply to
I finally had some time to get back to this problem, have been out of town for a few days teaching a class and when I got home, my house was 37 inside so have had to spend time figuring out what is wrong with my furnace, (no luck on that subject yet)

Anyway, I was able to replicate the problem by setting '$auth_modify_own' back to a 1. Once I was able to track it down to that, I re wrote the &get_record to set $resticted to a '0' if $db_userid is 'guest'. Since default permissions stops them from being able to edit across the board and I have a match requirement on the userid to record owner check before edit can be done, this should take care of both sides of the fence.

all is working fine and I even took care of the pdf write bug and it also writes pdf files successfully again.

Thanks for the hints Watts! hopefully it will behave now and/or I won't get anymore bright ideas....


Ted

Quote Reply
Re: [TedA] False empty record In reply to
Glad you were able to track it down... I just went thru the furnace issue myself and ended up replacing the outside AC compressor and inside blower/furnace unit. It wasn't cheap.
Fortunately I live in sunny Austin, Texas, so the furnance wasn't critical until the last week or so. Now the temps are back into the 70's again, but were expecting another cold snap
to get down in the 40's later in the week. I hate "winter" Tongue.
Quote Reply
Re: [TedA] False empty record In reply to
Might be too late to help but I know with some mods such as forward email, etc. it is necessary to comment out:


# ($restricted = 1) if ($auth_modify_own and !$per_admin); ### removed for private email

in sub get_record (.cgi file)

I know this was a cure for another problem, but it was so long ago I can't remember what that was now.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] False empty record In reply to
Lois;

Thanks for the feedback, I ended up re writing the line to compensate for the guest factor. I added in my own design of a email system when an edit has been made simply due to the type of database it is, so have not used any other 'email' mods. I do have to admit the system is pretty nice, it supports multiple marriages, 8 children per marriage (16 total), cross linking to everyone mentioned in the record, photo, 2 types of external file read into the record when displayed, output to PDF, family tree view mode, fast view mode. (You know how I get sometimes), a total of 75 variables are tracked per record. It does have a 'remote control' on the side which I can't quite make up my mind if I like or not, but it has all the links that dbman has.

If you remember from about 10 years ago, it was offered as a download, and I have recently resurrected it, but not a lot of call for it in 'todays internet'.

Take care and thanks for the feedback!

Ted