Gossamer Forum
Home : Products : DBMan : Customization :

Default User Question

Quote Reply
Default User Question
Ok, Is it possible, to have a radio select field in the record, that if set to no, does not allow the default user to see that record?

Bascially, if i say i dont want the default user to see certain records, what do i need to do to make it so I just have to check a field 'no' in the database?

I thought about an if statment in html_record_form. That would keep them from seeing a certain record when it tried to print out. Would that work?

I guess it would need to look like


if (($uid = default) & ($rec{'View'} = 'No')) {
print qq|
You are not authorized to view this record. |;
}


Does that look right? the syntax?

Quote Reply
Re: Default User Question In reply to
Ok I tried this:


if (($uid eq "default") && ($rec{'World'} eq 'No')) {
print qq|
You are not authorized to view this record. |;
}


at the beginning of html_record and it didnt work. It just shows the record as if that werent there. World is for the World Viewable field.

So, am I going about this correctly? Is there somewhere else, like in db.cgi i should put this? Or should I amend the elsif statments in db.cgi to take this into account?

Quote Reply
Re: Default User Question In reply to
Use $db_uid versus $uid.

Regards,

Eliot Lee
Quote Reply
Re: Default User Question In reply to
Worked Great. Thank you.

Quote Reply
Re: Default User Question In reply to
You're welcome.

Regards,

Eliot Lee