Checking user security
Default script Security
By default, Extender scripts do not check Sage security groups.
You don't need to give Run Scripts Security rights for Extender View or UI scripts to be active.
If you add a script to the Sage 300 desktop, by default all users have access to the script.
Note: To run a script from the Extender Setup > Scripts screen, users need to have the Security group in Sage Administrative Services.
Adding security checks in scripts
You can check the Sage 300 security groups in the script to allow different functionality depending on the user's security group.
Extender includes 26 security groups, User A to User Z that can be used in scripts.
See Adding Security
You can use the secCheck function to check the user's access.
secCheck() returns 0 if the logged onuser has access to the specified security resource, otherwise non-zero.
In the example below, if the user is in User A group, they will see a Hello World message. All other users will see "You don't have access to this functionality."
Using secCheck to check user security
if secCheck("VIUSERA") == 0:
showMessageBox("Hello World")
else:
showMessageBox("You don't have access to this functionality. Please contact your system admin.")
