Support three security levels for chats:
-
Public: anonymous users may view the chat content; all authenticated users may post messages.
-
Moderated: all users (including anonymous) may view the chat content; a moderator must grant each authenticated user access to post messages.
-
Private: a moderator must grant each authenticated user access to participate, and may specify whether each user may post messages or only view existing messages. Private chats do not display in the active / archived chat lists unless the current user has been granted access.
The above assumes anonymous users have been granted access to the application itself. Authenticated users who have been granted access to a private chat or post access to a moderated chat may "leave" (surrender their access) at any time, and a moderator may revoke or (in the case of moderated chats) lower a user's access. Moderators may also designate additional moderators. Moderators always have access to post messages. Finally, a moderator may change the overall security level for a chat (NOTE: implementation of this might get... interesting, as it would necessitate that, if users are viewing a chat when its access level changes - or their own access level changes - the user interface should ideally reflect the change immediately without requiring them to reload the page or leave and come back).