Page 1 of 1

Inject User Account in à job

Posted: Thu Jan 30, 2020 11:20 pm
by DamienB
Hello,
I have a user list (AD).

I want to assign the user account to a job without being logged into Switch Web Portal.

Is it possible to assign a job a "user account" so that only the chosen user sees the Job in Switch Web Portal (with the option View my jobs only)?

Re: Inject User Account in à job

Posted: Fri Jan 31, 2020 10:48 pm
by Padawan
You'll need a script (and the scripting module) which sets the username for the job.

The script can use setUserName() in the job class.

From the documentation:
setUserName( username: String )

Sets the short user name associated with the job. If the specified string does not match the name of an existing user in the user database a warning is logged (but the set operation does succeed).

Re: Inject User Account in à job

Posted: Sat Feb 01, 2020 11:01 am
by DamienB
OK thanks a lot.
unfortunately, I don't have the scripting module.
would there be another method or is it the only one?

Re: Inject User Account in à job

Posted: Sat Feb 01, 2020 11:10 am
by jan_suhr
You could add the variable [Connection.UserName] to an Input folders Private Data. But that require one input folder for each user.

Re: Inject User Account in à job

Posted: Sat Feb 01, 2020 11:32 pm
by DamienB
OK thanks You 👍🏻

Re: Inject User Account in à job

Posted: Sat Feb 01, 2020 11:32 pm
by DamienB
OK thanks You 👍🏻