Re: [Lazarus] allow/Deny user to show form

2017-02-15 Thread Fabio Luis Girardi via Lazarus
I don't know if the solution that I implemented last night is the best one. I did the following: //FIsEnabledBySecurity: the user can access the control? this variable is changed via another call, when user login or logout, checking the authorizations of the logged user. //FAllowUnauthorizedShowF

Re: [Lazarus] allow/Deny user to show form

2017-02-15 Thread Anthony Walter via Lazarus
What you probably should do is create a function to show a form of any class for you, and put that security check in that one place. Example: function ShowForm(FormClass: TFormClass; Modal: Boolean = False): Boolean; begin // your global function to check if a user can access a form class Res

[Lazarus] allow/Deny user to show form

2017-02-14 Thread Fabio Luis Girardi via Lazarus
Hi all! I'm rewriting the security system of my project, and I extended the support of my secure controls to all standard controls of Lazarus, including TForm and TFrame classes. The default behavior of all controls is if the user is not allowed to interact with it, the control is disabled, other