This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Change User Context in VB Script

Hello

Is it possible to run specific scripts called by a dialog script under the system context (sa user).

Situation:

I have a special script that runs a update for a specific config parm value. The user itself that runs the Dialog Script does not have any update rights to this Confg Parm, but in the context of calling this Action in the manager, I want to give him this permission. The problem is, if I load the parameter value and put the new value and commit this update by .save, then the User would need also the write permission to the configuration paramater in DialogConfigParm table.

I need some VB Script, so that I can have a new Session that runs the update under sa. The other option would be to fire an event that run the script on the Job Server, but I want to have this task interactive done.

Any hint to this situation?

 

  • You cannot as far as I know and you do not need to use the system user sa to be able to write configuration parameters.

    I suggest to add the edit permission for these special configuration parameters to a custom permission group. Use the edit where clause for the permission to limit it to the ones you want the users to be able to change.
  • This is my workaround I have implemented now, the group of users is now authorized to update only this config parameter. The update itself is done in the DilogScript of the Manager Task.

    But the question remains: If in a dialog script is done any action against certain records in the Database where the user normal does not have write permission, then I need to design a process chain to update this data, then the updates are executed by user sa in the database and the disadvantage is asynchron operation. If I want to do this update right away in the dialog action script, but under user sa, this would help me more.

    Some how I expect to do something like "Dim saSession as New Session("sa")" in the Dialog Script. 

  • Doesn't allowing the user to arbitrarily switch to a system execution context strike you as incredibly dangerous? Effectively you would have no security on your database.