From 7c84258558d95bedce0389c7d7fcb1c204da5f7e Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 9 Feb 2024 13:26:32 -0600 Subject: [PATCH] checkin --- README.org | 51 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/README.org b/README.org index 2489981..b16d3da 100644 --- a/README.org +++ b/README.org @@ -1,6 +1,18 @@ #+OPTIONS: H:99 ^:nil * Squad Whitelist Management +** As a ... + + +*** Admin + +- Someone who administrates the actual whitelisting service +- + +*** Organization Owner/Admin + +- Someone who runs a Squad community, like Asgard Eternal +- What should they be able to do? ** Discord Bot @@ -35,10 +47,12 @@ - Hit up API for all members of linked roles - Check if the members are in those roles and modify as needed -** Data +** API + + +*** General Layout - Org - - Tags - Single Owner - All permissions Managers have - Org Perms @@ -62,16 +76,12 @@ - Create - Rename - Groups - - Group: whitelist-{group-id} + - Group - Notes - Members - Group Perms - Manage Users (Add or Remove Users) - Manage Moderators (Allow other users to manage the group) - - Manage Remote Import (Allowed to set a remote import) - - This does not use the perms from the remote import, only pulls the members from the remote import list - - Can specify a group in the remote (only pull members in that remote admin list) - - Owner (All group perms) - Tags - Must be a tag that exists in the Org (reference a tag table) - Game Perms @@ -85,11 +95,13 @@ *** Users - Table Name: =users= - | Key | Type | Constraints | Description | - |--------------|-----------|--------------------------|-------------| - | =id= | ~DECIMAL~ | ~PRIMARY KEY~ | Steam64 | - | =discord_id= | ~DECIMAL~ | ~UNIQUE~ | | - | =superuser= | ~BOOLEAN~ | ~NOT NULL DEFAULT false~ | | + | Key | Type | Constraints | Description | + |--------------|-----------|--------------------------|-------------------| + | =id= | ~UUID4~ | ~PRIMARY KEY~ | | + | =steam64= | ~DECIMAL~ | ~UNIQUE~ | Steam64 ID | + | =playfab_id= | ~TEXT~ | ~UNIQUE~ | Master Playfab ID | + | =discord_id= | ~DECIMAL~ | ~UNIQUE~ | | + | =superuser= | ~BOOLEAN~ | ~NOT NULL DEFAULT false~ | | *** Organizations @@ -161,12 +173,15 @@ ***** Group Members - Table Name: =org_group_members= - | Key | Type | Constraints | Description | - |------------|-----------|-----------------------------------------------|-------------| - | =id= | ~UUID4~ | ~PRIMARY KEY~ | | - | =user_id= | ~DECIMAL~ | ~REFERENCES users(id) ON DELETE CASCADE~ | | - | =group_id= | ~UUID4~ | ~REFERENCES org_groups(id) ON DELETE CASCADE~ | | - | =owner= | ~BOOLEAN~ | ~NOT NULL DEFAULT false~ | | + | Key | Type | Constraints | Description | + |------------------------|-----------|-----------------------------------------------|----------------------------------------------------------------------| + | =id= | ~UUID4~ | ~PRIMARY KEY~ | | + | =user_id= | ~DECIMAL~ | ~REFERENCES users(id) ON DELETE CASCADE~ | | + | =group_id= | ~UUID4~ | ~REFERENCES org_groups(id) ON DELETE CASCADE~ | | + | =manage_users= | ~BOOLEAN~ | ~NOT NULL DEFAULT false~ | Allowed to add or remove members from group | + | =manage_mods= | ~BOOLEAN~ | ~NOT NULL DEFAULT false~ | Allowed to add or remove moderators to group | + | =manage_remote_import= | ~BOOLEAN~ | ~NOT NULL DEFAULT false~ | Allowed to set URL to import members from | + | =owner= | ~BOOLEAN~ | ~NOT NULL DEFAULT false UNIQUE~ | Has all permissions, cannot be removed from the group by a moderator | - Additional Constraints - ~UNIQUE (user_id, group_id)~