Article Details
Id:9903
Product:finPOWER Connect
Type:NEW
Version:1.05.06
Opened:03/04/2012
Closed:05/04/2012
Released:25/05/2012
Job: J009380

Scripts now have the ability to run with Administrator permission

Scripts now have the ability to run with Administrator permission.

The following type of Scripts allow a 'Run with special Administrator permission' box to be checked on the Permission page of the Scripts form.

  • Action
  • General
  • General User Interface
  • Object Events

Only Administrator users can update the 'Run with special Administrator permission' setting and when editing an existing Script, this setting along with the Script Code will be locked to non-Administrators.

When a Script is running in this mode, the following will happen:

  • All permission key checks in the business layer will pass
  • Objects that may not load due to User Group filters, e.g., Accounts, will always load

A new method has been added to allow Scripts to directly check a user's permissions, i.e., check whether the user really has permission and not just pass the check because the Script is running in this special mode.

' This will always return True for Scripts running with Administrator permission
If finBL.CurrentUser.Permissions.Allow("Account.DealerUpdate") Then 

' This will return False if the user does is not allowed this permission
If finBL.CurrentUser.Permissions.AllowDirect("Account.DealerUpdate") Then 

NOTE: This setting gives the Script certain Administrator rights, it does not make the current user into an Administrator, i.e., tasks that require the current user to be an Administrator will still fail for non-Administrator users.

The Script Details report has been updated to show this setting.