mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-15 03:26:53 -04:00
teampad feature
This commit is contained in:
parent
0f2d542bbe
commit
9212a39cff
14 changed files with 871 additions and 4 deletions
|
@ -49,6 +49,27 @@ exports.checkAccess = function (padID, sessionCookie, token, password, callback)
|
|||
callback(null, {accessStatus: "deny"});
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(padManager.isTeamPad(padID))
|
||||
{
|
||||
authorManager.getAuthor4Token(token, function(err, author)
|
||||
{
|
||||
if(ERR(err, callback)) return;
|
||||
|
||||
// TODO check session
|
||||
console.log('sessionCookie: ' + sessionCookie);
|
||||
sessionManager.getSessionInfo(sessionCookie, function(err, result) {
|
||||
if (err) {
|
||||
statusObject = {accessStatus: "denyTeamPad", authorID: author};
|
||||
callback(null, statusObject);
|
||||
} else {
|
||||
// TODO figure out how to force authorID to match account name...
|
||||
statusObject = {accessStatus: "grant", authorID: author};
|
||||
callback(null, statusObject);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
// a session is not required, so we'll check if it's a public pad
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue