Extended user rights in scripts

Grant scripts with enhanced privileges

Product line

Standard

|

Expert

Operating mode

CLOUD ABO

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 06.12.2013
Machine translated
Updated: 14.03.2024 | Method vtcapp.DisabledEvents() described.

A script entry can be granted enhanced rights. This ensures that the script has certain enhanced capabilities (for example, that it also works for users with restricted privileges).

If the Extended user rights option is activated on the script, the following methods can be built into the script text:

Methodology description

The method can be used to access Vertec objects that the user does not have access to. It must not be used in scripts or to access objects outside Vertec. The method must always be called with a with statement. The code enclosed in it will then have extended (admin) rights.

Caution: We recommend to use SystemContext() only where the extended permissions are really needed, because the method gives the user super-rights and thus full access to the entire Vertec even outside the script, i.e. in the whole session.

vtcapp.DisabledEvents()

This method is used to temporarily prevent the execution of event scripts. As soon as the method is exited, the event scripts are active again.

Vertec versions prior to 6.7.0.7 used vtcapp.disableevents() and vtcapp.enableevents. From this version onwards, vtcapp.DisabledEvents() should always be used.

For scripts that do not have the Advanced permissions option set, an error appears when one of these methods is called.

User Rights

For security reasons, scripts with the Extended user rights option set can only be edited by a user with administrator rights.

It is not allowed to run scripts with extended user rights interactively, i.e. directly in the script editor, unless Vertec is started with the /SUPER parameter. Caution is advised when using Vertec in SUPER mode. Please read the description in the article about command line parameters.