You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
439 B
JavaScript
18 lines
439 B
JavaScript
7 years ago
|
'use strict';
|
||
|
|
||
|
module.exports = {
|
||
|
name: 'Give global local login privileges',
|
||
|
timestamp: Date.UTC(2018, 8, 28),
|
||
|
method: function (callback) {
|
||
|
var meta = require('../../meta');
|
||
|
var privileges = require('../../privileges');
|
||
|
var allowLocalLogin = parseInt(meta.config.allowLocalLogin, 10) === 1;
|
||
|
|
||
|
if (allowLocalLogin) {
|
||
|
privileges.global.give(['local:login'], 'registered-users', callback);
|
||
|
} else {
|
||
|
callback();
|
||
|
}
|
||
|
},
|
||
|
};
|