Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Pascal
Expertise: Beginner
May 8, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Checking user ID from within a Delphi application

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 the Paradox 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 access rights in your application anyway. Might as well centralize control of the security rather than using a detection scheme that might not be very reliable.

Second, the networking calls for detecting a user are different for Windows NT and 95. Not only will you have to detect the user, but you'll first need to get the operating system they're using to make the proper call, and this makes the whole process of building the security layer more trouble than it's really worth.

I have experience with complex and sophisticated security systems built around Paradox databases; based on that experience, my preference would be to build a centralized security system that is application-specific.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date