diff options
author | Chocobozzz <me@florianbigard.com> | 2023-01-19 09:27:16 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2023-01-19 13:53:40 +0100 |
commit | e364e31e25bd1d4b8d801c845a96d6be708f0a18 (patch) | |
tree | 220785a42af361706eb8243960c5da9cddf4d2be /shared/models/server | |
parent | bc48e33b80f357767b98c1d310b04bdda24c6d46 (diff) | |
download | PeerTube-e364e31e25bd1d4b8d801c845a96d6be708f0a18.tar.gz PeerTube-e364e31e25bd1d4b8d801c845a96d6be708f0a18.tar.zst PeerTube-e364e31e25bd1d4b8d801c845a96d6be708f0a18.zip |
Implement signup approval in server
Diffstat (limited to 'shared/models/server')
-rw-r--r-- | shared/models/server/custom-config.model.ts | 1 | ||||
-rw-r--r-- | shared/models/server/server-config.model.ts | 1 | ||||
-rw-r--r-- | shared/models/server/server-error-code.enum.ts | 10 |
3 files changed, 10 insertions, 2 deletions
diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.ts index 7d9d570b1..846bf6159 100644 --- a/shared/models/server/custom-config.model.ts +++ b/shared/models/server/custom-config.model.ts | |||
@@ -83,6 +83,7 @@ export interface CustomConfig { | |||
83 | signup: { | 83 | signup: { |
84 | enabled: boolean | 84 | enabled: boolean |
85 | limit: number | 85 | limit: number |
86 | requiresApproval: boolean | ||
86 | requiresEmailVerification: boolean | 87 | requiresEmailVerification: boolean |
87 | minimumAge: number | 88 | minimumAge: number |
88 | } | 89 | } |
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts index 3b6d0597c..d0bd9a00f 100644 --- a/shared/models/server/server-config.model.ts +++ b/shared/models/server/server-config.model.ts | |||
@@ -131,6 +131,7 @@ export interface ServerConfig { | |||
131 | allowed: boolean | 131 | allowed: boolean |
132 | allowedForCurrentIP: boolean | 132 | allowedForCurrentIP: boolean |
133 | requiresEmailVerification: boolean | 133 | requiresEmailVerification: boolean |
134 | requiresApproval: boolean | ||
134 | minimumAge: number | 135 | minimumAge: number |
135 | } | 136 | } |
136 | 137 | ||
diff --git a/shared/models/server/server-error-code.enum.ts b/shared/models/server/server-error-code.enum.ts index 0e70ea0a7..a39cde1b3 100644 --- a/shared/models/server/server-error-code.enum.ts +++ b/shared/models/server/server-error-code.enum.ts | |||
@@ -39,7 +39,13 @@ export const enum ServerErrorCode { | |||
39 | */ | 39 | */ |
40 | INCORRECT_FILES_IN_TORRENT = 'incorrect_files_in_torrent', | 40 | INCORRECT_FILES_IN_TORRENT = 'incorrect_files_in_torrent', |
41 | 41 | ||
42 | COMMENT_NOT_ASSOCIATED_TO_VIDEO = 'comment_not_associated_to_video' | 42 | COMMENT_NOT_ASSOCIATED_TO_VIDEO = 'comment_not_associated_to_video', |
43 | |||
44 | MISSING_TWO_FACTOR = 'missing_two_factor', | ||
45 | INVALID_TWO_FACTOR = 'invalid_two_factor', | ||
46 | |||
47 | ACCOUNT_WAITING_FOR_APPROVAL = 'account_waiting_for_approval', | ||
48 | ACCOUNT_APPROVAL_REJECTED = 'account_approval_rejected' | ||
43 | } | 49 | } |
44 | 50 | ||
45 | /** | 51 | /** |
@@ -70,5 +76,5 @@ export const enum OAuth2ErrorCode { | |||
70 | * | 76 | * |
71 | * @see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/errors/invalid-token-error.js | 77 | * @see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/errors/invalid-token-error.js |
72 | */ | 78 | */ |
73 | INVALID_TOKEN = 'invalid_token', | 79 | INVALID_TOKEN = 'invalid_token' |
74 | } | 80 | } |