More general basic auth

This commit is contained in:
Egil Moeller 2012-04-19 14:25:12 +02:00
parent 4c1d94343f
commit ac36a99a72
6 changed files with 123 additions and 48 deletions

View file

@ -21,6 +21,8 @@ exports.expressCreateServer = function (hook_name, args, cb) {
exports.socketio = function (hook_name, args, cb) {
var io = args.io.of("/pluginfw/installer");
io.on('connection', function (socket) {
if (!socket.handshake.session.user.is_admin) return;
socket.on("load", function (query) {
socket.emit("installed-results", {results: plugins.plugins});
});