mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-14 19:16:54 -04:00
redirect to teampad area if not allowed to access this pad
This commit is contained in:
parent
e47aac423c
commit
3896553432
2 changed files with 11 additions and 6 deletions
|
@ -53,7 +53,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
});
|
});
|
||||||
|
|
||||||
args.app.post('/teampad/createteam', function(req, res) {
|
args.app.post('/teampad/createteam', function(req, res) {
|
||||||
var sessionID = req.cookies.express_sid,
|
var sessionID = req.signedCookies.express_sid,
|
||||||
currentUser = null,
|
currentUser = null,
|
||||||
signedIn = false,
|
signedIn = false,
|
||||||
teamName = null,
|
teamName = null,
|
||||||
|
@ -91,7 +91,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
});
|
});
|
||||||
|
|
||||||
args.app.post('/teampad/createpad', function(req, res) {
|
args.app.post('/teampad/createpad', function(req, res) {
|
||||||
var sessionID = req.cookies.express_sid;
|
var sessionID = req.signedCookies.express_sid;
|
||||||
|
|
||||||
var teamName = null,
|
var teamName = null,
|
||||||
padName = null,
|
padName = null,
|
||||||
|
@ -134,7 +134,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
});
|
});
|
||||||
|
|
||||||
args.app.post('/teampad/addaccount', function(req, res) {
|
args.app.post('/teampad/addaccount', function(req, res) {
|
||||||
var sessionID = req.cookies.express_sid,
|
var sessionID = req.signedCookies.express_sid,
|
||||||
currentUser = null,
|
currentUser = null,
|
||||||
signedIn = false,
|
signedIn = false,
|
||||||
teamName = null,
|
teamName = null,
|
||||||
|
@ -168,7 +168,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
});
|
});
|
||||||
|
|
||||||
args.app.get('/teampad', function(req, res) {
|
args.app.get('/teampad', function(req, res) {
|
||||||
var sessionID = req.cookies.express_sid;
|
var sessionID = req.signedCookies.express_sid;
|
||||||
var currentUser = null;
|
var currentUser = null;
|
||||||
var signedIn = false;
|
var signedIn = false;
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
});
|
});
|
||||||
|
|
||||||
args.app.get('/teampad/:teamName', function(req, res) {
|
args.app.get('/teampad/:teamName', function(req, res) {
|
||||||
var sessionID = req.cookies.express_sid;
|
var sessionID = req.signedCookies.express_sid;
|
||||||
var currentUser = null;
|
var currentUser = null;
|
||||||
var signedIn = false;
|
var signedIn = false;
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
|
|
||||||
// TODO implement, for now we are linking to normal pads via templates
|
// TODO implement, for now we are linking to normal pads via templates
|
||||||
args.app.get('/teampad/:teamName/:padName', function(req, res) {
|
args.app.get('/teampad/:teamName/:padName', function(req, res) {
|
||||||
var sessionID = req.cookies.express_sid;
|
var sessionID = req.signedCookies.express_sid;
|
||||||
var currentUser = null;
|
var currentUser = null;
|
||||||
var signedIn = false;
|
var signedIn = false;
|
||||||
|
|
||||||
|
|
|
@ -275,6 +275,11 @@ function handshake()
|
||||||
$('#passwordRequired').show();
|
$('#passwordRequired').show();
|
||||||
$("#passwordinput").focus();
|
$("#passwordinput").focus();
|
||||||
}
|
}
|
||||||
|
else if(obj.accessStatus == "denyTeamPad")
|
||||||
|
{
|
||||||
|
$("#editorloadingbox").html("<b>This is a Team pad</b><br>" +
|
||||||
|
"<a href='/teampad'>Manage teampads</a>");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if we haven't recieved the clientVars yet, then this message should it be
|
//if we haven't recieved the clientVars yet, then this message should it be
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue