MariaDB user sync disabled in dev environment
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2022-02-24 15:02:16 +01:00
parent 17b178b6bf
commit c3e480b2e7
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,10 @@
module.exports = Self => {
Self.getSynchronizer = async function() {
let NODE_ENV = process.env.NODE_ENV;
if (!NODE_ENV || NODE_ENV == 'development')
return null;
return await Self.findOne({
fields: ['id', 'rolePrefix', 'userPrefix', 'userHost']
});