MXS-2574: Prevent alterations to current user

Due to the fact that the alteration is emulated by deletion and creation
of the user in question, the current user cannot be altered.
This commit is contained in:
Markus Mäkelä
2019-06-24 12:53:08 +03:00
parent 9d06ff8402
commit 7117ab4719
2 changed files with 9 additions and 0 deletions

View File

@ -141,6 +141,10 @@ exports.builder = function(yargs) {
}, function(argv) {
maxctrl(argv, function(host) {
if (argv.u == argv.name) {
return error('Cannot alter current user')
}
var user = {
'data': {
'id': argv.name,