(plugins) adding signup scope and init hook, modifying ensureUserRegistrationAllowed allowedParams

This commit is contained in:
Rigel Kent
2019-11-25 11:16:12 +01:00
committed by Chocobozzz
parent efcd6f2e62
commit ba7b7e572f
6 changed files with 24 additions and 8 deletions

View File

@@ -38,7 +38,10 @@ export const clientFilterHookObject = {
'filter:api.search.videos.list.result': true,
// Filter params/result of the function that fetch video-channels according to the user search
'filter:api.search.video-channels.list.params': true,
'filter:api.search.video-channels.list.result': true
'filter:api.search.video-channels.list.result': true,
// Filter form
'filter:api.signup.registration.create.params': true
}
export type ClientFilterHookName = keyof typeof clientFilterHookObject
@@ -58,7 +61,10 @@ export const clientActionHookObject = {
'action:search.init': true,
// Fired every time Angular URL changes
'action:router.navigation-end': true
'action:router.navigation-end': true,
// Fired when the registration page is being initialized
'action:signup.register.init': true
}
export type ClientActionHookName = keyof typeof clientActionHookObject

View File

@@ -1 +1 @@
export type PluginClientScope = 'common' | 'video-watch' | 'search'
export type PluginClientScope = 'common' | 'video-watch' | 'search' | 'signup'

View File

@@ -3,7 +3,8 @@ export interface RegisterServerSettingOptions {
label: string
type: 'input'
// If the setting is not private, anyone can view its value
// If the setting is not private, anyone can view its value (client code included)
// If the setting is private, only server-side hooks can access it
// Mainly used by the PeerTube client to get admin config
private: boolean