API Docs for: 2.6
Show:

Group Class

Module: operator

Abstraction of a group of users in the operator panel.

It can throw exceptions.

Constructor

Group

(
  • groupName
)
Object

Parameters:

  • groupName String

    The group name

Returns:

Object:

The group object.

Item Index

Properties

Methods

addUsers

(
  • arr
)

Adds users to the group.

Parameters:

  • arr Array

    The list of usernames as strings

getName

() String

Return the group name.

Returns:

String:

The name of the group

getUserList

() Array

Returns the list of the users of the group.

Returns:

Array:

The list of the users of the group.

toJSON

() Object

Returns the JSON representation of the object.

{
    name: "Developer"          // the group name
    users: ["alessandro", "giovanni"] // the list of the users that belongs to the group
}

Returns:

Object:

The JSON representation of the object.

toString

() String

Returns the readable string of the group.

Returns:

String:

The readable description of the group

userCount

() Number

Return the number of the user members.

Returns:

Number:

The number of the user members.

Properties

name

String private

The group name.

users

Object private

The list of the users that belongs to the group. The keys are the usernames. The value is not used. It uses an object instead of an array for convenience of code.

Default: {}