TolliumUser (open)
The Tollium user object
Syntax
LOADLIB "mod::tollium/lib/users.whlib";
OBJECTTYPE TolliumUser
Constructor
- MACRO NEW(OBJECT authapi, OBJECT entity, INTEGER authobjectid, STRING registryrootname)
Creates a new tollium user object
Variables
- STRING emailaddress
User email address (as to be shown as sender in email messages)
- STRING login
User login name
- STRING realname
User real name (as to be shown in signatures and email messages)
Properties
- PROPERTY authapi (inherited from WRDAuthObject)
Authentication API (only set when this object was made through the authapi
- PROPERTY authobject (inherited from WRDAuthObject)
Authobject object (from rightsmgmt)
- PROPERTY authobjectid (inherited from WRDAuthObject)
Id of the corresponding authobject
- PROPERTY datetokens
Legacy datetokens, redirected to longdateformat. ADDME: fix all code to NOT use this property
- PROPERTY decimalseparator
Decimal separator
- PROPERTY entity (inherited from WRDAuthObject)
WRD entity
- PROPERTY entityid (inherited from WRDAuthObject)
Id of wrd entity
- PROPERTY language
Languagecode (in lowercase, eg 'en') - do not add subcodes (such as 'en-us')
- PROPERTY longdateformat
Date format tokens for long/readonly dates. Only the characters "DBMY-./" are allowed in this string!
- PROPERTY shortdateformat
Date format tokens for short/editable dates. Only the characters "DBMY-./" are allowed in this string!
- PROPERTY shortdateplaceholder
Date format tokens for short/editable dates. Only the characters "DBMY-./" are allowed in this string!
- PROPERTY thousandseparator
Thousands separator
- PROPERTY timemilitary
Military time? (24h)
- PROPERTY timezone
User time zone (UTC or GMT)
- PROPERTY type (inherited from WRDAuthObject)
Type of object (1: user, 2: unit, 3: role, 5: database role)
- PROPERTY wrdschema (inherited from WRDAuthObject)
WRD schema containing the entity
Functions
- BOOLEAN FUNCTION AddFavorite(STRING app, RECORD target, RECORD message, STRING title, STRING icon)
- MACRO ApplyDelayedRegistrySets()
Immediately applies all delayed registry key sets (but only if work isn't open)
- MACRO BroadcastToClient(RECORD message) (inherited from WRDAuthUser)
Broadcasts a message to the frontend
- BOOLEAN FUNCTION CanManageRight(STRING rightname) (inherited from WRDAuthUser)
Returns whether this user can manage a global right
- BOOLEAN FUNCTION CanManageRightOn(STRING rightname, INTEGER objectid) (inherited from WRDAuthUser)
Returns whether this user can manage a right for a specific object
- RECORD FUNCTION CreateAppPassword(STRING scope, STRING device) (inherited from WRDAuthUser)
Create an app specific password
- MACRO DelayedSetRegistryKey(STRING regkey, VARIANT value)
Schedules delayed setting of a registry key
- MACRO DeleteRegistryKey(STRING regkey)
Deletes a user registry key. Opens work if it hasn't been opened yet.
- MACRO DeleteRegistryNode(STRING regkey)
Deletes a user registry node. Opens work if it hasn't been opened yet.
- OBJECT FUNCTION EnsureAuthObject() (inherited from WRDAuthObject)
Returns the rights authobject for this object
- BOOLEAN FUNCTION ExistsInDatabase() (inherited from WRDAuthObject)
Returns whether this user still exists in the database
- BOOLEAN FUNCTION FavoriteExists(STRING title)
- STRING FUNCTION FormatDate(DATETIME value, BOOLEAN stored_utc, BOOLEAN shortformat)
Format a given UTC date according to the user's preferences
- STRING FUNCTION FormatDateTime(DATETIME value, STRING precision, BOOLEAN stored_utc, BOOLEAN shortformat)
Format a given UTC date and time according to the user's preferences
- STRING FUNCTION FormatFileSize(INTEGER64 filesize, INTEGER decimals, BOOLEAN showbytes)
Format the size of a file to a readable format, based on user's settings like language and decimal separator
- STRING FUNCTION FormatFloat(FLOAT value, INTEGER decimals)
Format a float value partly according to the user's preferences
- STRING FUNCTION FormatMoney(MONEY value, INTEGER decimals, BOOLEAN round)
Format a money value partly according to the user's preferences
- STRING FUNCTION FormatRecentDateTime(DATETIME value, BOOLEAN stored_utc)
- STRING FUNCTION FormatTime(DATETIME value, STRING precision, BOOLEAN stored_utc)
Format a given UTC time according to the user's preferences
- STRING FUNCTION FormatTimespan(INTEGER64 days, INTEGER64 msecs, STRING precision)
Format a given time span
- STRING FUNCTION FormatTimestamp(INTEGER64 value, STRING precision)
Format a given timestamp according to the user's preferences
- STRING FUNCTION GetBroadcastTarget() (inherited from WRDAuthUser)
Returns the name of the broadcast target (for updating the frontend)
- RECORD FUNCTION GetComponentState(STRING savestatekey)
Returns the saved state of a component
- RECORD FUNCTION GetLocale()
Get locale settings for this user
- STRING FUNCTION GetMessageBoxResult(STRING dlgid, STRING ARRAY buttons)
Returns the saved result for a message box
- RECORD FUNCTION GetObjectPath(STRING type, INTEGER objectid) (inherited from WRDAuthObject)
Returns the path of an object to the root of the object tree for a specific user. Returns a partial path if objects in the path have disappeared.
- RECORD ARRAY FUNCTION GetObjectsChildren(STRING type, INTEGER parentobjid, BOOLEAN describe) (inherited from WRDAuthObject)
Returns the children of an object (sorted on sortkey)
- RECORD FUNCTION GetObjectsTree(STRING type) (inherited from WRDAuthObject)
Returns the tree with all visible objects of a specific type
- INTEGER FUNCTION GetParentUnitId() (inherited from WRDAuthUser)
Returns the id of the unit of this user
- VARIANT FUNCTION GetRegistryKey(STRING regkey, VARIANT defaultvalue)
Read a user registry key
- STRING ARRAY FUNCTION GetRegistryKeyEventMasks(STRING ARRAY keys)
Get the event masks to use to listen to modifications to specific registry keys
- INTEGER ARRAY FUNCTION GetRootObjectsForGrantableRights(STRING ARRAY rights) (inherited from WRDAuthObject)
List accessible root objects for a list of grantable rights
- INTEGER ARRAY FUNCTION GetRootObjectsForRights(STRING ARRAY rights) (inherited from WRDAuthObject)
List accessible root objects for a list of rights
- STRING FUNCTION GetUncachedUserRightsName() (inherited from WRDAuthObject)
- RECORD FUNCTION GetUserDataForLogging()
Returns userdata for logging purposes
- STRING FUNCTION GetUserEventIdentifier() (inherited from WRDAuthObject)
Get a identifier to construct user events
- RECORD FUNCTION GetUserMarshallInfo()
Encodes this user for marshalling accress job boundaries
- STRING FUNCTION GetUserRightsName() (inherited from WRDAuthObject)
- MACRO GrantRightTo(STRING rightname, OBJECT grantee, BOOLEAN withgrantoption, BOOLEAN allowselfassignment, STRING comment) (inherited from WRDAuthUser)
Grants the specified global right to another user. Throws on failure.
- MACRO GrantRightToOn(STRING rightname, OBJECT grantee, INTEGER objectid, BOOLEAN withgrantoption, BOOLEAN allowselfassignment, STRING comment) (inherited from WRDAuthUser)
Grants the specified object right on the specified object to another user. Throws on failure
- MACRO GrantRoleTo(OBJECT roleobj, OBJECT grantee, RECORD options) (inherited from WRDAuthUser)
Grants a role to a user
- BOOLEAN FUNCTION HasAnyGrantableRight() (inherited from WRDAuthObject)
Returns whether this authobject has any grantable right
- BOOLEAN FUNCTION HasRight(STRING rightname) (inherited from WRDAuthObject)
Returns whether this user has a global right
- BOOLEAN FUNCTION HasRightOn(STRING rightname, INTEGER objectid) (inherited from WRDAuthObject)
Returns whether this user has an object-based right on an object.
- BOOLEAN FUNCTION HasRightOnAny(STRING rightname) (inherited from WRDAuthObject)
Returns whether this user has a right on any object for an object-based right, or, if no objects exist at all, whether the user would automatically have that right on newly created objects.
- INTEGER ARRAY FUNCTION HasRightOnMultiple(STRING rightname, INTEGER ARRAY objectids) (inherited from WRDAuthObject)
Returns on which objects from a list this user has an object-based right on
- BOOLEAN FUNCTION HasRole(OBJECT roleobj) (inherited from WRDAuthObject)
Return whether the object has the specified role
- BOOLEAN FUNCTION IsFavoriteAdded(STRING app, RECORD target, RECORD message)
- BOOLEAN FUNCTION IsVisibleFor(OBJECT authobj) (inherited from WRDAuthObject)
- RECORD ARRAY FUNCTION ListAppPasswords(STRING limittoscope) (inherited from WRDAuthUser)
- MACRO LoadSettingsFromRegistry()
Reads the settings from this user from the registry
- DATETIME FUNCTION LocalToUTC(DATETIME value)
Convert a user's local date and time to UTC
- VARIANT FUNCTION ReadRegistryKey(STRING regkey, RECORD options)
Read a user registry key
- VARIANT FUNCTION ReadRegistryNode(STRING regkey)
Get all keys in a user registry node
- MACRO RemoveFavorite(STRING app, RECORD target, RECORD message)
- MACRO RevokeRightFrom(STRING rightname, OBJECT grantee, BOOLEAN onlyremovegrantoption, BOOLEAN allowselfassignment) (inherited from WRDAuthUser)
Revokes the specified global right from another user. Throws on failure.
- MACRO RevokeRightFromOn(STRING rightname, OBJECT grantee, INTEGER objectid, BOOLEAN onlyremovegrantoption, BOOLEAN allowselfassignment) (inherited from WRDAuthUser)
Revokes the specified object right on the specified object from another user. Throws on failure.
- MACRO RevokeRoleFrom(OBJECT roleobj, OBJECT grantee) (inherited from WRDAuthUser)
Revokes a role to a user
- MACRO SetComponentState(STRING savestatekey, RECORD state)
Sets the saved state for a component
- MACRO SetLocale(RECORD newsettings)
Updates locale settings for a user
- MACRO SetMessageBoxResult(STRING dlgid, STRING result)
Saved the result for a message box
- MACRO SetRegistryKey(STRING regkey, VARIANT value)
Creates/sets a user registry key, opens work if needed
- BOOLEAN FUNCTION ShowDeveloperOptions()
Returns whether to show developer options and apps
- MACRO UpdateGrant(STRING action, STRING rightname, INTEGER objectid, OBJECT grantee, RECORD options) (inherited from WRDAuthUser)
Grants the specified object right on the specified object to another user. Throws on failure.
- MACRO UpdateRoleGrant(STRING action, INTEGER roleid, OBJECT grantee, RECORD options) (inherited from WRDAuthUser)
Grant, update or revoke the a role. Throws on failure.
- DATETIME FUNCTION UTCToLocal(DATETIME value)
Convert a UTC date and time to the user's time zone
- MACRO WriteRegistryKey(STRING regkey, VARIANT value, RECORD options)
Set a user registry key if it exists