Inject User Account in à job

Post Reply
DamienB
Newbie
Posts: 14
Joined: Mon Dec 16, 2019 2:43 pm

Inject User Account in à job

Post 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)?
Padawan
Advanced member
Posts: 358
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: Inject User Account in à job

Post 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).
DamienB
Newbie
Posts: 14
Joined: Mon Dec 16, 2019 2:43 pm

Re: Inject User Account in à job

Post 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?
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Inject User Account in à job

Post 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.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
DamienB
Newbie
Posts: 14
Joined: Mon Dec 16, 2019 2:43 pm

Re: Inject User Account in à job

Post by DamienB »

OK thanks You 👍🏻
DamienB
Newbie
Posts: 14
Joined: Mon Dec 16, 2019 2:43 pm

Re: Inject User Account in à job

Post by DamienB »

OK thanks You 👍🏻
Post Reply