Managing chat users
This topic explains how Chat organizes users. Chat users are an entity separate from Kentico users. They are stored in a dedicated database table as a combination of their nickname and a foreign key binding them to Kentico users. The binding, however, is optional - absence of the binding makes the user anonymous.
There are two types of chat users - anonymous and registered. Anonymous users are site visitors, who either don't posses a user account on a site, or they do have an account but are not logged in. To enter the chat, users only need to choose a nickname. Registration is not necessary.
If a registered user is logged in, the nickname they choose when entering the chat is tied to their account. As a result, the nickname is reserved for that user.
The on-line state of chat users is monitored on two levels - site level and room level. A user who enters the chat starts pinging the server on a regular basis, thus keeping the server aware that they are on-line. When the user goes off-line (i. e. stops pinging the server), their on-line state is changed, rather than the user record being deleted altogether.
When the user enters a room, the client side of the application includes the information in the packets sent to the server, thus notifying the server that they are on-line in a certain chat room. When a user with elevated permissions leaves the room, they are not removed from the room, only their on-line state changes. Users without permissions are removed from rooms immediately after leaving them or leaving the chat.
Chat offers a set of permissions intended for allowing or denying various actions to certain users.
Chat offers standard module permissions adjustable in the Permissions application. The following permissions control allowed actions in the Chat application:
- Global read - allows users in the given role to display the lists of global chat rooms, chat users and canned responses, but doesn't permit any modifications. The permission is limited to global objects, it doesn't apply to objects bound to a specific site.
- Global modify - gives full control of global chat rooms, chat users and canned responses. The permission is limited to global objects, it doesn't apply to objects bound to a specific site.
- Read - allows users in the given role to display the lists of site-bound chat rooms, users and canned responses, but doesn't permit any modifications. The permission doesn't apply to global objects.
- Modify - gives full control of site-bound chat rooms, users and canned responses. The permission doesn't apply to global objects.
- Enter support - displays an additional toolbar in the user interface, allowing you to use support chat.
The following permissions are applicable to users using chat on the live site:
- Manage rooms - gives users of the given role the right to modify chat room properties (e.g., create, delete, set passwords, send invitations, etc.) and administer users (e.g., define room administrators or kick users).
- Create room from live site - allows users to create a new chat room using a button in the list of chat rooms.
There are also permissions which are specific to the Chat application. These can be assigned to a chat user for a particular room. This means that a single user can have elevated rights in one room, while being a regular user without any special permissions in another.
The following list presents users with different permissions and the actions they are allowed to perform:
- Regular user - doesn't have any special rights. Such user can only post messages to public rooms.
- Invited user - can post messages to a private room they are invited to.
- Room administrator - can post messages, reject messages, kick users and define other administrators. An administrator can also edit the room's properties or disable the room to make it unavailable to be joined.
- Room creator - has the same rights as an administrator, however, this permission can be taken away from the user only in the the Chat application interface by a user with the Modify permission for Chat.
Room permissions can be set while adding or editing a room user in Chat -> Rooms -> Users.
Creating and editing chat users
You can manage chat users in Chat -> Users. The page lists registered users who entered chat on the current site.
Adding a new user
To add a new user to the chat, click New chat user. Select a registered user, enter a nickname for the user and click Save.
The system doesn't allow adding anonymous users, since registered users wouldn't then be able to choose nicknames added this way.
You can click Edit (adjust the user's properties.) in the Actions column to bring up the user editing page. On the page, you can change the user's nickname. Additionally, you can click Edit, which opens a new window allowing to