Give us contact

Do you prefer to ask us directly?

Call us +420 605 203 938 (the Czech Republic)

or use this contacts

AyMINE

Related links


FI - Finance Management
Front-End Scripting

Object USER - Documentation

Object is used under si name user. It is generally available so that it can be used anywhere in all methods

The evalUserObj class provides various methods and properties to retrieve user-related information and perform checks regarding the user's roles, permissions, and settings in the system. Below is the full documentation of all available methods and properties.

Properties

ID: number

Returns the user ID as a number. Be cautious about the type control; use == (not ===) to compare with values from the database.

sysUserID: number

Returns the sysUserID of the logged-in user as a number.

sysClientID: number

Returns the sysClientID as a number. Be cautious about conversions.

selfClientID: number

Returns an alternative name for the sysClientID in case the script needs to distinguish between different values.

inDebug: boolean

Returns true if any debug mode is active. Be careful about using this, as a regular user might know how to start debug mode.

notifAllowed: boolean

Returns whether the user has allowed notifications.

isPublicCompany: boolean

Returns true if the user is logged into a public company, based on the system settings.

isTrusted: boolean

Returns true if the user’s assigned computer is trusted (note that the concept of 'safe' is not yet fully implemented).

isHelp: boolean

Returns true if the user requests help links to be shown. This is primarily used in the primary menu.

trustDevName: string

Returns the name of the trusted device or undefined if the device is not trusted.

activeWallet: boolean

Returns true if the user has an active wallet.

roles: string

Returns a comma-separated list of roles that the user has.

clientName: string

Returns the name of the client company the user is logged into.

readLang: string

Returns the preferred language set by the user for messages and translations.

userDesc: string

Returns a string representing the user's description, typically the full name (surname + name).

clientDesc: string

Returns the description of the client, if available.

isDeveloper: boolean

Returns true if the user has a developer position.

publicClient: boolean

Returns true if the client is public, based on client settings.

testClient: boolean

Returns true if the client is a test client (based on the client settings).

Methods

hasRight(...uright: string[]): boolean

Checks if the user has the specified right(s). The rights are given as a list of strings in the format sys@sys1User.doSomething.

hasRole(...role: number[]): boolean

Checks if the user has any of the specified roles. Takes one or more role IDs.

hasProcess(...pr: string[]): boolean

Checks if the user is active in any of the specified system processes. The processes are given as a list of shortcuts (e.g., ['SR', 'HR']).

hasModule(module: string): boolean

Checks if the user has access to the specified module.

hasModuleOption(module: string, option: string): boolean

Checks if the user has access to a specific option of a module (defined by the superadmin).

moduleTextOption(module: string, optName: string): string

Returns the text value of a module option, defined by the superadmin in the module settings.

loadSelfData(): void

Loads user-related data, such as module attributes and dashboard settings.

constructor(): evalUserObj

Initializes the evalUserObj object and loads the initial data.

Static Methods

getMe(): evalUserObj

Returns the singleton instance of the evalUserObj class.