diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2019-11-25 11:16:12 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@framasoft.org> | 2019-11-25 11:16:12 +0100 |
commit | ba7b7e572f0634e534320a057f4cc0a95f2a541d (patch) | |
tree | 687759585d7c92f865112ca3e920764471603b20 /shared/models/plugins | |
parent | efcd6f2e625c1c5d06025f27a2bf3a84d3f8b483 (diff) | |
download | PeerTube-ba7b7e572f0634e534320a057f4cc0a95f2a541d.tar.gz PeerTube-ba7b7e572f0634e534320a057f4cc0a95f2a541d.tar.zst PeerTube-ba7b7e572f0634e534320a057f4cc0a95f2a541d.zip |
(plugins) adding signup scope and init hook, modifying ensureUserRegistrationAllowed allowedParams
Diffstat (limited to 'shared/models/plugins')
-rw-r--r-- | shared/models/plugins/client-hook.model.ts | 10 | ||||
-rw-r--r-- | shared/models/plugins/plugin-client-scope.type.ts | 2 | ||||
-rw-r--r-- | shared/models/plugins/register-server-setting.model.ts | 3 |
3 files changed, 11 insertions, 4 deletions
diff --git a/shared/models/plugins/client-hook.model.ts b/shared/models/plugins/client-hook.model.ts index 07ea7eb96..91167ff8c 100644 --- a/shared/models/plugins/client-hook.model.ts +++ b/shared/models/plugins/client-hook.model.ts | |||
@@ -38,7 +38,10 @@ export const clientFilterHookObject = { | |||
38 | 'filter:api.search.videos.list.result': true, | 38 | 'filter:api.search.videos.list.result': true, |
39 | // Filter params/result of the function that fetch video-channels according to the user search | 39 | // Filter params/result of the function that fetch video-channels according to the user search |
40 | 'filter:api.search.video-channels.list.params': true, | 40 | 'filter:api.search.video-channels.list.params': true, |
41 | 'filter:api.search.video-channels.list.result': true | 41 | 'filter:api.search.video-channels.list.result': true, |
42 | |||
43 | // Filter form | ||
44 | 'filter:api.signup.registration.create.params': true | ||
42 | } | 45 | } |
43 | 46 | ||
44 | export type ClientFilterHookName = keyof typeof clientFilterHookObject | 47 | export type ClientFilterHookName = keyof typeof clientFilterHookObject |
@@ -58,7 +61,10 @@ export const clientActionHookObject = { | |||
58 | 'action:search.init': true, | 61 | 'action:search.init': true, |
59 | 62 | ||
60 | // Fired every time Angular URL changes | 63 | // Fired every time Angular URL changes |
61 | 'action:router.navigation-end': true | 64 | 'action:router.navigation-end': true, |
65 | |||
66 | // Fired when the registration page is being initialized | ||
67 | 'action:signup.register.init': true | ||
62 | } | 68 | } |
63 | 69 | ||
64 | export type ClientActionHookName = keyof typeof clientActionHookObject | 70 | export type ClientActionHookName = keyof typeof clientActionHookObject |
diff --git a/shared/models/plugins/plugin-client-scope.type.ts b/shared/models/plugins/plugin-client-scope.type.ts index 0c616c5ed..1c6d884f0 100644 --- a/shared/models/plugins/plugin-client-scope.type.ts +++ b/shared/models/plugins/plugin-client-scope.type.ts | |||
@@ -1 +1 @@ | |||
export type PluginClientScope = 'common' | 'video-watch' | 'search' | export type PluginClientScope = 'common' | 'video-watch' | 'search' | 'signup' | ||
diff --git a/shared/models/plugins/register-server-setting.model.ts b/shared/models/plugins/register-server-setting.model.ts index 78c5abd1b..65a181705 100644 --- a/shared/models/plugins/register-server-setting.model.ts +++ b/shared/models/plugins/register-server-setting.model.ts | |||
@@ -3,7 +3,8 @@ export interface RegisterServerSettingOptions { | |||
3 | label: string | 3 | label: string |
4 | type: 'input' | 4 | type: 'input' |
5 | 5 | ||
6 | // If the setting is not private, anyone can view its value | 6 | // If the setting is not private, anyone can view its value (client code included) |
7 | // If the setting is private, only server-side hooks can access it | ||
7 | // Mainly used by the PeerTube client to get admin config | 8 | // Mainly used by the PeerTube client to get admin config |
8 | private: boolean | 9 | private: boolean |
9 | 10 | ||