codefordenver / hawthorn-client

Hawthorn is based on the concept of affinity groups, a group of individuals who come together around a shared experience, interest or common goal. With Hawthorn affinity groups, you are free to start or join conversations and share useful resources with people in your community.
http://hawth.org
Apache License 2.0
2 stars 1 forks source link

Create a private community #35

Closed trex closed 4 years ago

trex commented 4 years ago
trex commented 4 years ago

I am using the Group concept within FusionAuth since Users and Groups are modeled there effectively to meet the project requirements. We will have a UUID referencing the Group in FusionAuth and will use this as a foreign key into our application database tables (Threads).

I am creating the Group and then adding the user to that Group as its first member as an admin of the Group. The Group admin role is modeled through metadata on the Group, which can be seen in the FusionAuth response body to retrieve the Group:

{
  "group": {
    "data": {
      "admins": [
        "1d056ee1-0ae3-4d74-8bd7-68d0aa16b888"
      ],
      "description": "just testin"
    },
    "id": "b545f672-23d5-476c-931f-f1f5af3b03cd",
    "name": "Test group 1",
    "tenantId": "0db3d604-d75b-1e90-5eca-d4ee9a303a33"
  }
}