Title: Adding Jobs For Other Users, Security Error
trezaei - November 10, 2006 01:48 AM (GMT)
On lawson 9.0 (with Laua security) I have written an AGS call that can add jobs to GL165 at run time. This works fine if I am logged in as user test1 and adding a job for user test1.
But if I change the USER-NAME field in the AGS call for another user I get:
AGS error: Security violation
Which is kinda what I was hoping I wouldn't get. I get the same error even when I turn laua off. Anyone have any idea if I can pull this off at all?
As an aside: Since you're gonna ask anyway, I have an automated process that is going to add GL165 jobs at run time. It will decide which user should get the final report depending on a set of parameters. So I was thinking I was just going to add the report under that user and I wouldn't have to worry about it.
In the past I have gone as far as hacking GEN to import the required records for the other users in the report file handling tables. I would rather not have to do that. If you can think of any other ideas I am open to that as well.
Thanks
schroncd - November 10, 2006 06:43 AM (GMT)
ummmmm....... How about using distribution groups to decide who gets the output? That way you can run the job as any user and use the required dist group to deliver it?
Milo - November 10, 2006 03:13 PM (GMT)
You're saying that you get that error even with lawsec=off?? I thought that security violations only occurred when security was on.
trezaei - November 10, 2006 06:19 PM (GMT)
| QUOTE (schroncd @ Nov 10 2006, 06:43 AM) |
| ummmmm....... How about using distribution groups to decide who gets the output? That way you can run the job as any user and use the required dist group to deliver it? |
Yeah Dave,
I have done that in the past, but when you're adding the job at run time you can't really setup distribution for it. Annnnd to top it off, report distribution is not available for the error report of the GL165 which is what I really need.
| QUOTE |
| You're saying that you get that error even with lawsec=off?? I thought that security violations only occurred when security was on. |
Yes that's what I thought as well, I think I might have a lead into this issue as of this morning, I'll post if I figure it out.
Thanks
T
schroncd - November 10, 2006 06:47 PM (GMT)
OK..... What about processing on the BACKEND? Would 'loadrpts' do you any good?
trezaei - November 10, 2006 07:13 PM (GMT)
okay so the problem was very silly.
All I needed was to put the domain name behind the user name. :banghead:
Anyway, now I have a different issue.
I can add the job for the other user
I can also submit that job using jqsubmit or wtsubmit.
However, that user only gets the error files in his print manager and not the main report file. Now this is what I was talking about when I said this particular report doesn't distribute the error file correctly.
Anyway, looks like I am back to hacking GEN which means a 10 minute task is going to take me 3 days. :lala:
Milo - November 10, 2006 07:24 PM (GMT)
Tan:
Maybe you can do the report distribution "outside of Lawson" by using a script to copy the report file out of its directory and distribute it by email; or maybe the script could copy it to a common shared folder; or something like that?
That would solve the problem, just not inside of Lawson. Think "outside the box" here and a quick, easy solution may present itself. :rau:
trezaei - November 10, 2006 07:49 PM (GMT)
yeah I thought of the email route but the client really would like to stick with Lawson's delivery methods i.e. print manager.
I was also thinking of placing the file on a web directory somewhere and just placing a link on the user's portal page to the directory that contains it.
I haven't decided yet but either way, its not going to be pretty.