Fix ldap weight setting
This commit is contained in:
parent
9b66758c3d
commit
fac2f7afe6
@ -84,10 +84,10 @@ async function register ({
|
||||
login: options => login(peertubeHelpers, settingsManager, options)
|
||||
})
|
||||
|
||||
store.weight = await settingsManager.getSetting('weight')
|
||||
setWeight(await settingsManager.getSetting('weight'))
|
||||
|
||||
settingsManager.onSettingsChange(settings => {
|
||||
if (settigns && typeof settings.weight === 'number') store.weight = weight
|
||||
if (settings && settings.weight) setWeight(settings.weight)
|
||||
})
|
||||
}
|
||||
|
||||
@ -102,6 +102,10 @@ module.exports = {
|
||||
|
||||
// ############################################################################
|
||||
|
||||
function setWeight (weight) {
|
||||
store.weight = parseInt(weight + '', 10)
|
||||
}
|
||||
|
||||
async function login (peertubeHelpers, settingsManager, options) {
|
||||
const logger = peertubeHelpers.logger
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "peertube-plugin-auth-ldap",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.3",
|
||||
"description": "Add LDAP support to login form in PeerTube.",
|
||||
"engine": {
|
||||
"peertube": ">=2.2.0"
|
||||
|
Loading…
Reference in New Issue
Block a user