简体   繁体   中英

How to password protect a form but keep the information visible

We have this form that displays monitoring information from our servers. It also offers some options to restart services, computers, disable tasks, etc. etc.

What we would like is to keep the information visible. But, if someone clicks on the form trying to press a button, select an option, etc. the form asks for Password and then it allows to access only if the password is correct.

We were thinking that maybe we can add some kind of transparent component over the whole form and then, on click, it asks for password. If password is correct, the transparent component hides and the form is accessible.

After X minutes of no interaction with the form, it puts the transparent component over the form again.

Is this possible? Is there an easier way? We don't know if it's possible to have this "invisible" component covering the whole form but reacting to clicks.

The controls that need passwords should call a login function. If there isn't a current login it prompts for the password. You also have an inactivity check that clears the logged-in state.

One line per protected task + the login routine. No fancy games with transparent controls that could be defeated. (Tools like AutoIt are quite capable of clicking a control that's not on top.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM