MXS-2574: Add PATCH for /users/inet endpoint
The alteration of user passwords is now done inside MaxScale. This prevents the possibility of a user locking themselves out.
This commit is contained in:
@ -195,11 +195,6 @@ describe("Alter Commands", function() {
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('rejects alteration to current user', function() {
|
||||
return doCommand('-u bob -p bob alter user bob bob2')
|
||||
.should.be.rejected
|
||||
})
|
||||
|
||||
it('creates user', function() {
|
||||
return verifyCommand('create user testuser test', 'users/inet/testuser')
|
||||
})
|
||||
@ -212,5 +207,13 @@ describe("Alter Commands", function() {
|
||||
return doCommand('destroy user testuser')
|
||||
})
|
||||
|
||||
it('allows alteration to current user', function() {
|
||||
return verifyCommand('create user bob bob --type=admin', 'users/inet/bob')
|
||||
.then(() => doCommand('-u bob -p bob alter user bob bob2'))
|
||||
.then(() => doCommand('-u bob -p bob2 alter user bob bob'))
|
||||
.then(() => doCommand('-u bob -p bob list servers'))
|
||||
.then(() => doCommand('-u bob -p bob destroy user bob'))
|
||||
})
|
||||
|
||||
after(stopMaxScale)
|
||||
});
|
||||
|
Reference in New Issue
Block a user