I'm making an application with many dialog windows and classes that perform different actions. I want users to log in to the program before they can do anything.
Different users have different permissions for the programs operations. Every time a button is pressed to do something, I need to check if the current user is allowed to do that action.
What I'm wondering is, should I make a Current User class global to my project? If so, how can I do it and still be using good programming practice (I'd rather not have to pass this object to ALL my functions every time they are called).
I also need to do a similar thing with a logging class. Every action has to add an entry to the log.
Any help or advice is appreciated,
- Milner -
Different users have different permissions for the programs operations. Every time a button is pressed to do something, I need to check if the current user is allowed to do that action.
What I'm wondering is, should I make a Current User class global to my project? If so, how can I do it and still be using good programming practice (I'd rather not have to pass this object to ALL my functions every time they are called).
I also need to do a similar thing with a logging class. Every action has to add an entry to the log.
Any help or advice is appreciated,
- Milner -