More work on the api. Also auth middleware stuff

More work on the placeholder functions for the Linstrom API
Additionally, started work on a slightly more sophisticated
authentication control system
And ran `go generate` again
This commit is contained in:
Melody Becker 2024-10-31 16:53:42 +01:00
parent b9c95a0297
commit 873f52d64f
14 changed files with 637 additions and 300 deletions

View file

@ -51,6 +51,8 @@ type Role struct {
CanBoost *bool
CanIncludeLinks *bool
CanIncludeSurvey *bool
CanFederateFedi *bool
CanFederateBsky *bool
CanChangeDisplayName *bool
@ -75,7 +77,12 @@ type Role struct {
ScanCreatedLocalNotes *bool
ScanCreatedFollowerOnlyNotes *bool
ScanCreatedPrivateNotes *bool
DisallowInteractionsWith []string `gorm:"type:bytes;serializer:gob"`
// Blocks all interactions and federation between users with the role and all included ids/handles
// TODO: Decide whether this is a list of handles or of account ids
// Handles would increase the load due to having to search for them first
// while ids would require to store every single account mentioned
// which could cause escalating storage costs
DisallowInteractionsWith []string `gorm:"type:bytes;serializer:gob"`
WithholdNotesForManualApproval *bool
WithholdNotesBasedOnRegex *bool