ensureAdmin verbessert
This commit is contained in:
parent
7ab105a575
commit
9b28e3408d
@ -110,11 +110,13 @@ module.exports = function(app, app_cfg, db, async, bcrypt, passport, io) {
|
||||
err.status = 401;
|
||||
next(err);
|
||||
});
|
||||
} else {
|
||||
// denied. redirect to login
|
||||
var err = new Error('Sie sind nicht angemeldet!');
|
||||
err.status = 401;
|
||||
next(err);
|
||||
};
|
||||
};
|
||||
|
||||
function createUser(req, res) {
|
||||
db.get('SELECT user FROM waip_users WHERE user = ?', req.body.username, function(err, row) {
|
||||
@ -152,7 +154,7 @@ module.exports = function(app, app_cfg, db, async, bcrypt, passport, io) {
|
||||
res.redirect('/edit_users');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function editUser(req, res) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user