mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
Grant access, when valid session is available and sessionNoPassword is set
This commit is contained in:
parent
0aa0c69ba3
commit
121c02c74f
3 changed files with 14 additions and 0 deletions
|
@ -219,6 +219,12 @@ exports.checkAccess = function (padID, sessionCookie, token, password, callback)
|
|||
//--> grant access
|
||||
statusObject = {accessStatus: "grant", authorID: sessionAuthor};
|
||||
}
|
||||
//- the setting to bypass password validation is set
|
||||
else if(settings.sessionNoPassword)
|
||||
{
|
||||
//--> grant access
|
||||
statusObject = {accessStatus: "grant", authorID: sessionAuthor};
|
||||
}
|
||||
//- the pad is password protected and password is correct
|
||||
else if(isPasswordProtected && passwordStatus == "correct")
|
||||
{
|
||||
|
|
|
@ -89,6 +89,11 @@ exports.requireSession = false;
|
|||
*/
|
||||
exports.editOnly = false;
|
||||
|
||||
/**
|
||||
* A flag that bypasses password prompts for user with valid sessions
|
||||
*/
|
||||
exports.sessionNoPassword = false;
|
||||
|
||||
/**
|
||||
* Max age that responses will have (affects caching layer).
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue