This should belong to the previous generator commits

This commit is contained in:
Melody Becker 2024-11-20 13:44:36 +01:00
parent 7591c8ad64
commit 5f94a71415

View file

@ -116,86 +116,3 @@ type linstromEmote struct {
ServerId uint `jsonapi:"attr,server-id"`
Server *linstromOriginServer `jsonapi:"relation,server"`
}
// Role is essentially just a carbon copy of storage/roles.go
type linstromRole struct {
Id uint `jsonapi:"primary,roles"`
CreatedAt time.Time `jsonapi:"attr,created-at"`
UpdatedAt *time.Time `jsonapi:"attr,updated-at,omitempty"`
// Name of the role
Name string `jsonapi:"attr,name"`
// Priority of the role
// Lower priority gets applied first and thus overwritten by higher priority ones
// If two roles have the same priority, the order is undetermined and may be random
// Default priority for new roles is 1 to always overwrite default user
// And full admin has max priority possible
Priority uint32 `jsonapi:"attr,priority"`
// Whether this role is for a for a single user only (like custom, per user permissions in Discord)
// If yes, Name will be the id of the user in question
IsUserRole bool `jsonapi:"attr,is-user-role"`
// Whether this role is one built into Linstrom from the start or not
// Note: Built-in roles can't be modified
IsBuiltIn bool `jsonapi:"attr,is-builtin"`
// --- User permissions ---
CanSendMedia *bool `jsonapi:"attr,can-send-media"`
CanSendCustomEmotes *bool `jsonapi:"attr,can-send-custom-emotes"`
CanSendCustomReactions *bool `jsonapi:"attr,can-send-custom-reactions"`
CanSendPublicNotes *bool `jsonapi:"attr,can-send-public-notes"`
CanSendLocalNotes *bool `jsonapi:"attr,can-send-local-notes"`
CanSendFollowerOnlyNotes *bool `jsonapi:"attr,can-send-follower-only-notes"`
CanSendPrivateNotes *bool `jsonapi:"attr,can-send-private-notes"`
CanSendReplies *bool `jsonapi:"attr,can-send-replies"`
CanQuote *bool `jsonapi:"attr,can-quote"`
CanBoost *bool `jsonapi:"attr,can-boost"`
CanIncludeLinks *bool `jsonapi:"attr,can-include-links"`
CanIncludeSurvey *bool `jsonapi:"attr,can-include-survey"`
CanChangeDisplayName *bool `jsonapi:"attr,can-change-display-name"`
BlockedUsers []string `jsonapi:"attr,blocked-users"`
CanSubmitReports *bool `jsonapi:"attr,can-submit-reports"`
CanLogin *bool `jsonapi:"attr,can-login"`
CanMentionOthers *bool `jsonapi:"attr,can-mention-others"`
HasMentionCountLimit *bool `jsonapi:"attr,has-mention-count-limit"`
MentionLimit *uint32 `jsonapi:"attr,mention-count-limit"`
// CanViewBoosts *bool
// CanViewQuotes *bool
// CanViewMedia *bool
// CanViewCustomEmotes *bool
// --- Automod ---
AutoNsfwMedia *bool `jsonapi:"attr,auto-nsfw-media"`
AutoCwPosts *bool `jsonapi:"attr,auto-cw-posts"`
AutoCwPostsText *string `jsonapi:"attr,auto-cw-posts-text"`
ScanCreatedPublicNotes *bool `jsonapi:"attr,scan-created-public-notes"`
ScanCreatedLocalNotes *bool `jsonapi:"attr,scan-created-local-notes"`
ScanCreatedFollowerOnlyNotes *bool `jsonapi:"attr,scan-created-follower-only-notes"`
ScanCreatedPrivateNotes *bool `jsonapi:"attr,scan-created-private-notes"`
DisallowInteractionsWith []string `jsonapi:"attr,disallow-interactions-with"`
WithholdNotesForManualApproval *bool `jsonapi:"attr,withhold-notes-for-manual-approval"`
WithholdNotesBasedOnRegex *bool `jsonapi:"attr,withhold-notes-based-on-regex"`
WithholdNotesRegexes []string `jsonapi:"attr,withhold-notes-regexes"`
// --- Admin perms ---
// If set, counts as all permissions being set as given and all restrictions being disabled
FullAdmin *bool `jsonapi:"attr,full-admin"`
CanAffectOtherAdmins *bool `jsonapi:"attr,can-affect-other-admins"`
CanDeleteNotes *bool `jsonapi:"attr,can-delete-notes"`
CanConfirmWithheldNotes *bool `jsonapi:"attr,can-confirm-withheld-notes"`
CanAssignRoles *bool `jsonapi:"attr,can-assign-roles"`
CanSupressInteractionsBetweenUsers *bool `jsonapi:"attr,can-supress-interactions-between-users"`
CanOverwriteDisplayNames *bool `jsonapi:"attr,can-overwrite-display-names"`
CanManageCustomEmotes *bool `jsonapi:"attr,can-manage-custom-emotes"`
CanViewDeletedNotes *bool `jsonapi:"attr,can-view-deleted-notes"`
CanRecoverDeletedNotes *bool `jsonapi:"attr,can-recover-deleted-notes"`
CanManageAvatarDecorations *bool `jsonapi:"attr,can-manage-avatar-decorations"`
CanManageAds *bool `jsonapi:"attr,can-manage-ads"`
CanSendAnnouncements *bool `jsonapi:"attr,can-send-announcements"`
}