Click or drag to resize
TOPICA Basic Class PermissionCollection

[This is preliminary documentation and is subject to change.]

The PermissionCollection class is a collection of Permission objects.

PermissionCollection properties

Property

Type

Description

ToString

String

Returns a string representation for debugging etc.

ToLines

String

Returns a string representation of the Permission objects in the collection, each line containing the string representation of one Permission object. The lines are separated by Newline.

Count

Integer

Number of objects in the collection

Item

Permission

See indexing below.

PermissionCollection indexing

Index type

Description

Integer

Zero-based:

EmployeeUser.Permissions[0] returns the first Permission related to the Employee user.

String

Look-up by permission name.

May be used to test the logged in Employee user's permissions (= access rights).

Example

Description

EmployeeUser.Permissions["Everything"]

Returns the "Everything" Permission, if the logged in Employee user has this permission - null if the user does not have this permission.

IsNotNull(EmployeeUser.Permissions["Everything"])

Returns true iff the Employee user has the "Everything" Permission - in other words, iff the user is system administrator.