This commit is contained in:
Price Hiller 2024-02-09 13:26:32 -06:00
parent f9bcc11bab
commit 7c84258558
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -1,6 +1,18 @@
#+OPTIONS: H:99 ^:nil #+OPTIONS: H:99 ^:nil
* Squad Whitelist Management * 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 ** Discord Bot
@ -35,10 +47,12 @@
- Hit up API for all members of linked roles - Hit up API for all members of linked roles
- Check if the members are in those roles and modify as needed - Check if the members are in those roles and modify as needed
** Data ** API
*** General Layout
- Org - Org
- Tags
- Single Owner - Single Owner
- All permissions Managers have - All permissions Managers have
- Org Perms - Org Perms
@ -62,16 +76,12 @@
- Create - Create
- Rename - Rename
- Groups - Groups
- Group: whitelist-{group-id} - Group
- Notes - Notes
- Members - Members
- Group Perms - Group Perms
- Manage Users (Add or Remove Users) - Manage Users (Add or Remove Users)
- Manage Moderators (Allow other users to manage the group) - 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 - Tags
- Must be a tag that exists in the Org (reference a tag table) - Must be a tag that exists in the Org (reference a tag table)
- Game Perms - Game Perms
@ -85,11 +95,13 @@
*** Users *** Users
- Table Name: =users= - Table Name: =users=
| Key | Type | Constraints | Description | | Key | Type | Constraints | Description |
|--------------|-----------|--------------------------|-------------| |--------------|-----------|--------------------------|-------------------|
| =id= | ~DECIMAL~ | ~PRIMARY KEY~ | Steam64 | | =id= | ~UUID4~ | ~PRIMARY KEY~ | |
| =discord_id= | ~DECIMAL~ | ~UNIQUE~ | | | =steam64= | ~DECIMAL~ | ~UNIQUE~ | Steam64 ID |
| =superuser= | ~BOOLEAN~ | ~NOT NULL DEFAULT false~ | | | =playfab_id= | ~TEXT~ | ~UNIQUE~ | Master Playfab ID |
| =discord_id= | ~DECIMAL~ | ~UNIQUE~ | |
| =superuser= | ~BOOLEAN~ | ~NOT NULL DEFAULT false~ | |
*** Organizations *** Organizations
@ -161,12 +173,15 @@
***** Group Members ***** Group Members
- Table Name: =org_group_members= - Table Name: =org_group_members=
| Key | Type | Constraints | Description | | Key | Type | Constraints | Description |
|------------|-----------|-----------------------------------------------|-------------| |------------------------|-----------|-----------------------------------------------|----------------------------------------------------------------------|
| =id= | ~UUID4~ | ~PRIMARY KEY~ | | | =id= | ~UUID4~ | ~PRIMARY KEY~ | |
| =user_id= | ~DECIMAL~ | ~REFERENCES users(id) ON DELETE CASCADE~ | | | =user_id= | ~DECIMAL~ | ~REFERENCES users(id) ON DELETE CASCADE~ | |
| =group_id= | ~UUID4~ | ~REFERENCES org_groups(id) ON DELETE CASCADE~ | | | =group_id= | ~UUID4~ | ~REFERENCES org_groups(id) ON DELETE CASCADE~ | |
| =owner= | ~BOOLEAN~ | ~NOT NULL DEFAULT false~ | | | =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 - Additional Constraints
- ~UNIQUE (user_id, group_id)~ - ~UNIQUE (user_id, group_id)~