Browse Source

fixing bugs..>

pull/12/head
michael shanks 7 years ago
parent
commit
c2d444f808
  1. 2
      packages/core
  2. 12
      packages/datastores/datastores/local.js
  3. 38
      packages/server/.vscode/launch.json
  4. 424
      packages/server/appPackages/master/appDefinition.json
  5. 7
      packages/server/tests/authenticate.js
  6. 5
      packages/server/utilities/masterAppInternal.js

2
packages/core

@ -1 +1 @@
Subproject commit 10009efb45995dc6a01ae941e8e539e2226a115c
Subproject commit 29318b29d35ac8d8bfb137a5e739a308e01c1829

12
packages/datastores/datastores/local.js

@ -56,10 +56,14 @@ const readableFileStream = root => async path =>
join(root, path), "utf8"
);
const writableFileStream = root => async path =>
fs.createWriteStream(
join(root, path), "utf8"
);
const writableFileStream = root => path =>
new Promise((resolve, reject) => {
const stream = fs.createWriteStream(
join(root, path),
"utf8");
stream.on("open", () => resolve(stream));
stream.on("error", reject);
});
const getFolderContents = root => async path =>
await readdir(

38
packages/server/.vscode/launch.json

@ -0,0 +1,38 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--runInBand"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest-cli/bin/jest",
}
},
{
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--config",
"jest.config.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
}
}
]
}

424
packages/server/appPackages/master/appDefinition.json

File diff suppressed because one or more lines are too long

7
packages/server/tests/authenticate.js

@ -107,6 +107,13 @@ module.exports = (app) => {
});
it("should be able with re-authenticate when user is enabled again", async () => {
await app.post("/_master/api/enableUser", {
username: testUserName
})
.set("cookie", ownerCookie)
.expect(statusCodes.OK);
await app.post("/_master/api/authenticate", {
username: testUserName,
password: testPassword

5
packages/server/utilities/masterAppInternal.js

@ -161,9 +161,8 @@ module.exports = async (config) => {
const sessions = await bb.indexApi.listItems(
"/mastersessions_by_user",
{
rangeStartParams:{name:username},
rangeEndParams:{name:username},
searchPhrase:`username:${username}`
rangeStartParams:{username},
rangeEndParams:{username}
}
);

Loading…
Cancel
Save