Inject User Account in à job

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

Inject User Account in à job

Post by DamienB » Thu Jan 30, 2020 11:20 pm

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: 303
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: Inject User Account in à job

Post by Padawan » Fri Jan 31, 2020 10:48 pm

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: 9
Joined: Mon Dec 16, 2019 2:43 pm

Re: Inject User Account in à job

Post by DamienB » Sat Feb 01, 2020 11:01 am

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: 421
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Inject User Account in à job

Post by jan_suhr » Sat Feb 01, 2020 11:10 am

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: 9
Joined: Mon Dec 16, 2019 2:43 pm

Re: Inject User Account in à job

Post by DamienB » Sat Feb 01, 2020 11:32 pm

OK thanks You 👍🏻

DamienB
Newbie
Posts: 9
Joined: Mon Dec 16, 2019 2:43 pm

Re: Inject User Account in à job

Post by DamienB » Sat Feb 01, 2020 11:32 pm

OK thanks You 👍🏻

Post Reply