fix: JSON fields handling for MariaDB
This commit is contained in:
@@ -22,14 +22,15 @@ module.exports = class Authentication extends Model {
|
||||
properties: {
|
||||
key: {type: 'string'},
|
||||
isEnabled: {type: 'boolean'},
|
||||
config: {type: 'object'},
|
||||
selfRegistration: {type: 'boolean'},
|
||||
domainWhitelist: {type: 'object'},
|
||||
autoEnrollGroups: {type: 'object'}
|
||||
selfRegistration: {type: 'boolean'}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static get jsonAttributes() {
|
||||
return ['config', 'domainWhitelist', 'autoEnrollGroups']
|
||||
}
|
||||
|
||||
static async getStrategy(key) {
|
||||
return WIKI.models.authentication.query().findOne({ key })
|
||||
}
|
||||
|
Reference in New Issue
Block a user