Skip to content

Content moderation

tiblu edited this page Jan 7, 2019 · 21 revisions

Describes content moderation setup and principles of Citizen OS

What content can be moderated?

  • Arguments (comments) on public Topics

Future:

Basic moderation principles

  • Never delete anything when possible, but hide it from default views. This provides a mechanism to any User to verify if moderation was justified.
  • Community reporting
  • Community up and downvote

Managing moderators

There are 2 types of moderators:

  • Global moderators - can moderate all Citizen OS content. This is the most common type of moderator, if you host Citizen OS for your own community/company.
  • Partner moderators - can only moderate content of specific Partner. Only relevant if you host Citizen OS and provide a service to Partners. All Partners are registered in Partners table.

All moderators are registered in Moderators table:

  • Moderators that have userId and NOT partnerId are global moderators.
  • Moderators that have userId and partnerId are Partner moderators.

Create/delete global moderator

Create

INSERT INTO "Moderators" (
  "id",
  "userId", 
  "createdAt", 
  "updatedAt"
) 
VALUES (
  md5(random()::text || clock_timestamp()::text)::uuid,
  'faccdf47-3c33-47c0-a974-e63a1dc36b95', 
  NOW(), 
  NOW()
);

Where:

  • faccdf47-3c33-47c0-a974-e63a1dc36b95 - is the id from Users table.

Delete

DELETE FROM "Moderators" WHERE "userId" = 'faccdf47-3c33-47c0-a974-e63a1dc36b95'

Where:

  • faccdf47-3c33-47c0-a974-e63a1dc36b95 - is the id from Users table.

Create/delete Partner moderator

Create

INSERT INTO "Moderators" (
  "id", 
  "userId", 
  "partnerId", 
  "createdAt", 
  "updatedAt"
) 
VALUES (
  md5(random()::text || clock_timestamp()::text)::uuid,
  'faccdf47-3c33-47c0-a974-e63a1dc36b95', 
  '2a666c99-0254-49a6-9a10-b09cbae36f6b', 
  NOW(), 
  NOW()
);

Where:

  • faccdf47-3c33-47c0-a974-e63a1dc36b95 - is the id from Users table.
  • 2a666c99-0254-49a6-9a10-b09cbae36f6b - is the id from Parnters table.

Delete

DELETE FROM "Moderators" 
WHERE "userId" = 'faccdf47-3c33-47c0-a974-e63a1dc36b95' 
  AND "partnerId" = '2a666c99-0254-49a6-9a10-b09cbae36f6b'

Where:

  • faccdf47-3c33-47c0-a974-e63a1dc36b95 - is the id from Users table.
  • 2a666c99-0254-49a6-9a10-b09cbae36f6b - is the id from Parnters table.
Clone this wiki locally