temporary access - passing
This commit is contained in:
parent
80c7df9dae
commit
e321a8b3fa
|
@ -42,7 +42,7 @@ module.exports = (config, app) => {
|
|||
|
||||
await instanceApi.authApi.setPasswordFromTemporaryCode(
|
||||
ctx.request.body.tempCode,
|
||||
ctx.request.body.newpassword);
|
||||
ctx.request.body.newPassword);
|
||||
|
||||
ctx.response.status = StatusCodes.OK;
|
||||
})
|
||||
|
|
|
@ -133,7 +133,7 @@ module.exports = (app) => {
|
|||
|
||||
testPassword = "test_user_new_password";
|
||||
|
||||
const tempCode = await readFile(`tempaccess${testUserName}`, "utf8");
|
||||
const tempCode = await readFile(`./tests/.data/tempaccess${testUserName}`, "utf8");
|
||||
|
||||
await app.post("/_master/api/setPasswordFromTemporaryCode", {
|
||||
username: testUserName,
|
||||
|
|
|
@ -13,7 +13,7 @@ const masterOwnerPassword = "test_master_pass";
|
|||
const masterPlugins = {
|
||||
main: {
|
||||
outputToFile : ({filename, content}) => {
|
||||
fs.writeFile(`./tests/${filename}`, content, {encoding:"utf8"});
|
||||
fs.writeFile(`./tests/.data/${filename}`, content, {encoding:"utf8"});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,11 +154,7 @@ module.exports = async (config) => {
|
|||
const getFullAccessInstanceApiForUsername = async (appname, username) => {
|
||||
|
||||
if(isMaster(appname)) {
|
||||
const user = bb.authApi.getUsers()
|
||||
.find(u => u.name === username);
|
||||
if(!user) return;
|
||||
if(!user.enabled) return;
|
||||
return user;
|
||||
return bb;
|
||||
}
|
||||
else {
|
||||
const app = await getApplication(appname);
|
||||
|
|
Loading…
Reference in New Issue