PDA

View Full Version : Superuser?


ABC123

Steve Wood
09-28-2004, 01:13 PM
I'm trying to add a "superuser" to my password protected WAS system. It currently uses filters as described in the web demo to authenticate logins against the Customer table, as in [tmpl_MyForm.DBF.filter = "Customer = \""+session.customer + chr(34)].

But how do I log in as a superuser and see ALL records? I've tried various (probably silly) solutions such as creating a customer_ID of "*". I have an idea that the soln is to play with the filter something like this:

if(session.customer="superuser") then
' no filter
else
tmpl_Tracking.DBF.filter = "Customer = \""+session.customer + chr(34)
endif

Steve Wood
09-28-2004, 01:36 PM
Nevermind .. the following simple filter worked fine:

if session.customer="super" then
tmpl_MyForm.DBF.filter = ""
else
'tmpl_MyForm.DBF.filter = "Customer = \""+session.customer + chr(34)
end if