...
Object Publish:
If object has a metadata attribute “enableDiscussions“ set as true, create a NodeBB category with name as “<object_name>” (e.g.: Science Textbook for Class VII) when the object is published.
NodeBB Category is created under the hierarchy <tenant_name>/<category_name> (e.g. NCERT/Textbook). Both the <tenant_name> category and <category_name> category are marked as sections, i.e. no topics/posts are allowed in those categories.
A mapping is created for between the object id and category id in a mapping table.
Content creator, collaborators and reviewers are given moderator access to this category.
Registered-Users group in NodeBB is given privileges to write posts (i.e. reply) and vote in the NodeBB category.
To start with, only moderators can create topics in the NodeBB category.
A new NodeBB group with identifier as “<category_name>-<object_id>” (Textbook-do_1234349) is created and is given read/write/vote access to the NodeBB category.
Users from Registered-Users group who have either previously replied/voted in this category and achieved a reputation level (above a configured level) are added to this NodeBB group.
This will be implemented using a custom NodeBB plugin.
When object is retired in Sunbird:
The corresponding NodeBB category will be disabled.
Sunbird Groups
Users in Sunbird can create groups and can enable discussions for the users within that group.
...
Workflow
When group is created:
NodeBB category is created with name as “Group-<group_name>” (e.g.: Group - DPS Ghaziabad Class X Group).
NodeBB Category is created under the hierarchy “Sunbird Groups“. “Sunbird Groups“ category is marked as a section, i.e. no topics/posts are allowed in this category.
A mapping is created for between the sunbird group id and NodeBB category id in a mapping table.
Group creator is given moderator privilege in the NodeBB category
When a user is added to the group
If user already exists in NodeBB, user is given read/write/vote access to the NodeBB category
If user does not exist in NodeBB, user is created in NodeBB first and then read/write/vote access to the NodeBB caategory
When a user is made admin to the group
the user is given moderator privilege in the NodeBB category
When a user is removed as admin
moderator privilege for the user is removed in the NodeBB category
When a user leaves the group or removed from the group
all privileges for the user in the NodeBB category are removed
When the group is disabled/deleted
NodeBB category is disabled
Tenant Announcements
category name - “<Tenant_Name> - Announcements”
a group is created in NodeBB for the tenant. Group name will be “Tenant-<tenant_id>”
validated users of the org are added to the group
group is given read, upvote/downvote access to the category
Org Admins will have write access to the category
...