userdirectory: add eventlog entry
This commit is contained in:
@@ -80,6 +80,8 @@ exports = module.exports = {
|
||||
ACTION_USER_UPDATE: 'user.update',
|
||||
ACTION_USER_TRANSFER: 'user.transfer',
|
||||
|
||||
ACTION_USER_DIRECTORY_PROFILE_CONFIG_UPDATE: 'userdirectory.profileconfig.update',
|
||||
|
||||
ACTION_VOLUME_ADD: 'volume.add',
|
||||
ACTION_VOLUME_UPDATE: 'volume.update',
|
||||
ACTION_VOLUME_REMOUNT: 'volume.remount',
|
||||
@@ -169,7 +171,7 @@ async function listPaged(actions, search, page, perPage) {
|
||||
assert.strictEqual(typeof page, 'number');
|
||||
assert.strictEqual(typeof perPage, 'number');
|
||||
|
||||
let data = [];
|
||||
const data = [];
|
||||
let query = `SELECT ${EVENTLOG_FIELDS} FROM eventlog`;
|
||||
|
||||
if (actions.length || search) query += ' WHERE';
|
||||
@@ -206,7 +208,7 @@ async function cleanup(options) {
|
||||
];
|
||||
|
||||
let query = `SELECT ${EVENTLOG_FIELDS} FROM eventlog WHERE creationTime <= ? AND (`;
|
||||
let data = [ creationTime ];
|
||||
const data = [ creationTime ];
|
||||
actions.forEach(function (action, i) {
|
||||
query += ' action = ? ';
|
||||
data.push(action);
|
||||
|
||||
Reference in New Issue
Block a user