mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-22 22:21:09 +08:00
feat: add whitelist register mode
This commit is contained in:
@@ -45,6 +45,9 @@ public class Notification {
|
||||
@Column(name = "reaction_type")
|
||||
private ReactionType reactionType;
|
||||
|
||||
@Column(length = 1000)
|
||||
private String content;
|
||||
|
||||
@Column
|
||||
private Boolean approved;
|
||||
|
||||
|
||||
@@ -27,5 +27,7 @@ public enum NotificationType {
|
||||
/** Someone unfollowed you */
|
||||
USER_UNFOLLOWED,
|
||||
/** A user you subscribe to created a post or comment */
|
||||
USER_ACTIVITY
|
||||
USER_ACTIVITY,
|
||||
/** A user requested registration approval */
|
||||
REGISTER_REQUEST
|
||||
}
|
||||
|
||||
9
src/main/java/com/openisle/model/RegisterMode.java
Normal file
9
src/main/java/com/openisle/model/RegisterMode.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package com.openisle.model;
|
||||
|
||||
/**
|
||||
* Application-wide user registration mode.
|
||||
*/
|
||||
public enum RegisterMode {
|
||||
DIRECT,
|
||||
WHITELIST
|
||||
}
|
||||
@@ -42,6 +42,12 @@ public class User {
|
||||
@Column(length = 1000)
|
||||
private String introduction;
|
||||
|
||||
@Column(length = 1000)
|
||||
private String registerReason;
|
||||
|
||||
@Column(nullable = false)
|
||||
private boolean approved = true;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(nullable = false)
|
||||
private Role role = Role.USER;
|
||||
|
||||
Reference in New Issue
Block a user