When sending a job to the HPC HP server using the HPC API, the job is sent by calling the SubmitJob function:
void SubmitJob (ISchedulerJob job, string username, string password);
If the username is null, the system uses the Windows username; if the password is zero, the system searches for the cached password.
If there is no cached password (or the password is cached incorrectly), the system will offer a console screen that asks for the user password (until the correct password is entered).
I want to avoid this screen, instead I would like to check if the user has the correct password in the cached form, otherwise my own dialog box will be displayed, and not the default console screen.
The problem is that so far I have not been able to find a way to do this, it ISchedulerhas a method called GetUserPrivileges()that tells you if the user has No Access \ User \ Adminprivileges on the server. But it will return Userfor any existing username on the server, no matter if the cached password exists.
Is it possible to check before sending a task if the user has the correct cached password, and if not, ask for the password? or perhaps replacing the default query password console with your own custom dialog?
source
share