aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test/main.js')
-rw-r--r--server/tests/fixtures/peertube-plugin-test/main.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js
index 7c53f6afe..055884d29 100644
--- a/server/tests/fixtures/peertube-plugin-test/main.js
+++ b/server/tests/fixtures/peertube-plugin-test/main.js
@@ -86,6 +86,17 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
86 return false 86 return false
87 } 87 }
88 }) 88 })
89
90 registerHook({
91 target: 'filter:api.user.signup.allowed.result',
92 handler: (result, params) => {
93 if (params && params.body.email.includes('jma')) {
94 return { allowed: false, errorMessage: 'No jma' }
95 }
96
97 return result
98 }
99 })
89} 100}
90 101
91async function unregister () { 102async function unregister () {