How can I check the user ID from a Delphi Application?
I need to allow only some users access to certain menu items, or limit the option available to users depending on who they are.
This is for a Delphi application running under Windows 95 on a Windows NT 4 server/network accessing a Paradox 7 database.
There are various ways to approach this problem. But having come from theParadox for Windows world, you’re probably better off having users log in to the application itself to control screen and menu access.There are a couple of reasons to justify this position.
First, you’ll have to keep a database of users and their accessrights in your application anyway. Might as well centralize control of thesecurity rather than using a detection scheme that might not be very reliable.
Second, the networking calls for detecting a user are different forWindows NT and 95. Not only will you have to detect the user, butyou’ll first need to get the operating system they’re using to make the propercall, and this makes the whole process ofbuilding the security layer more trouble than it’s really worth.
I have experience with complex and sophisticated security systemsbuilt around Paradox databases; based on that experience, my preferencewould be to build a centralized security system that is application-specific.