refs #5475 fix accessScope
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
6ab431f8ef
commit
4b8b7a9d82
|
@ -71,8 +71,6 @@ fdescribe('VnUser Sign-in()', () => {
|
|||
expect(error).toBeDefined();
|
||||
expect(error.statusCode).toBe(403);
|
||||
expect(error.message).toBe('REQUIRES_2FA');
|
||||
|
||||
await employee.updateAttribute('twoFactor', null);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const {models} = require('vn-loopback/server/server');
|
||||
|
||||
fdescribe('VnUser validate-auth()', () => {
|
||||
describe('VnUser validate-auth()', () => {
|
||||
describe('validateAuth', () => {
|
||||
it('should signin if data is correct', async() => {
|
||||
await models.AuthCode.create({
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
autocomplete="false">
|
||||
</vn-textfield>
|
||||
<vn-textfield
|
||||
ng-if="$ctrl.$state.params.twoFactor"
|
||||
ng-if="$ctrl.$state.params.twoFactor == 'true'"
|
||||
label="Verification code"
|
||||
ng-model="$ctrl.code"
|
||||
vn-name="code"
|
||||
|
|
|
@ -15,6 +15,10 @@ export default class Controller {
|
|||
}
|
||||
|
||||
$onInit() {
|
||||
this.oldPassword = 'nightmare';
|
||||
this.repeatPassword = 'test.1234';
|
||||
this.newPassword = 'test.1234';
|
||||
this.verificationCode = '1234';
|
||||
if (!this.$state.params.id)
|
||||
this.$state.go('login');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const {models} = require('vn-loopback/server/server');
|
||||
|
||||
fdescribe('account changePassword()', () => {
|
||||
describe('account changePassword()', () => {
|
||||
const ctx = {req: {accessToken: {userId: 70}}};
|
||||
const unauthCtx = {
|
||||
req: {
|
||||
|
|
|
@ -37,6 +37,13 @@
|
|||
"principalType": "ROLE",
|
||||
"principalId": "$authenticated",
|
||||
"permission": "ALLOW"
|
||||
},
|
||||
{
|
||||
"property": "changePassword",
|
||||
"accessType": "EXECUTE",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue