You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new user types reserved, bot, and remote (#24026)
This allows for usernames, and emails connected to them to be reserved
and not reused.
Use case, I manage an instance with open registration, and sometimes
when users are deleted for spam (or other purposes), their usernames are
freed up and they sign up again with the same information.
This could also be used to reserve usernames, and block them from being
registered (in case an instance would like to block certain things
without hardcoding the list in code and compiling from scratch).
This is an MVP, that will allow for future work where you can set
something as reserved via the interface.
---------
Co-authored-by: delvh <[email protected]>
Co-authored-by: John Olheiser <[email protected]>
Copy file name to clipboardExpand all lines: models/user/user.go
+15-1
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,18 @@ const (
41
41
42
42
// UserTypeOrganization defines an organization
43
43
UserTypeOrganization
44
+
45
+
// UserTypeReserved reserves a (non-existing) user, i.e. to prevent a spam user from re-registering after being deleted, or to reserve the name until the user is actually created later on
46
+
UserTypeUserReserved
47
+
48
+
// UserTypeOrganizationReserved reserves a (non-existing) organization, to be used in combination with UserTypeUserReserved
49
+
UserTypeOrganizationReserved
50
+
51
+
// UserTypeBot defines a bot user
52
+
UserTypeBot
53
+
54
+
// UserTypeRemoteUser defines a remote user for federated users
0 commit comments