mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
webaccess: Pass settings.users
to the authenticate hook
Authentication plugins almost always want to read and modify `settings.users`. The settings can already be accessed in a few other ways, but this is much more convenient.
This commit is contained in:
parent
250e932f59
commit
80639fdc6a
2 changed files with 8 additions and 13 deletions
|
@ -65,7 +65,8 @@ exports.checkAccess = (req, res, next) => {
|
|||
step1PreAuthenticate = () => authorize(step2Authenticate);
|
||||
|
||||
step2Authenticate = () => {
|
||||
const ctx = {req, res, next};
|
||||
if (settings.users == null) settings.users = {};
|
||||
const ctx = {req, res, users: settings.users, next};
|
||||
// If the HTTP basic auth header is present, extract the username and password so it can be
|
||||
// given to authn plugins.
|
||||
const httpBasicAuth =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue