Merge pull request #2319 from ether/fix-socket-admin-etc
Fixing admin issues due to socket upgradepull/2336/head
commit
b0872cc447
|
@ -14,7 +14,6 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
search_results: {},
|
||||
errors: [],
|
||||
};
|
||||
|
||||
res.send( eejs.require("ep_etherpad-lite/templates/admin/plugins.html", render_args) );
|
||||
});
|
||||
args.app.get('/admin/plugins/info', function(req, res) {
|
||||
|
@ -25,7 +24,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 || !socket.handshake.session.user.is_admin) return;
|
||||
|
||||
if (!socket.conn.request.session || !socket.conn.request.session.user || !socket.conn.request.session.user.is_admin) return;
|
||||
|
||||
socket.on("getInstalled", function (query) {
|
||||
// send currently installed plugins
|
||||
|
|
|
@ -22,7 +22,8 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
exports.socketio = function (hook_name, args, cb) {
|
||||
var io = args.io.of("/settings");
|
||||
io.on('connection', function (socket) {
|
||||
if (!socket.handshake.session.user || !socket.handshake.session.user.is_admin) return;
|
||||
|
||||
if (!socket.conn.request.session || !socket.conn.request.session.user || !socket.conn.request.session.user.is_admin) return;
|
||||
|
||||
socket.on("load", function (query) {
|
||||
fs.readFile('settings.json', 'utf8', function (err,data) {
|
||||
|
|
|
@ -10,7 +10,8 @@ $(document).ready(function () {
|
|||
resource = baseURL.substring(1) + "socket.io";
|
||||
|
||||
//connect
|
||||
socket = io.connect(url, {resource : resource}).of("/pluginfw/installer");
|
||||
var room = url + "pluginfw/installer";
|
||||
socket = io.connect(room, {resource : resource});
|
||||
|
||||
function search(searchTerm, limit) {
|
||||
if(search.searchTerm != searchTerm) {
|
||||
|
|
|
@ -9,7 +9,8 @@ $(document).ready(function () {
|
|||
resource = baseURL.substring(1) + "socket.io";
|
||||
|
||||
//connect
|
||||
socket = io.connect(url, {resource : resource}).of("/settings");
|
||||
var room = url + "settings";
|
||||
socket = io.connect(room, {resource : resource});
|
||||
|
||||
socket.on('settings', function (settings) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue