Skip to content

Commit 1269d03

Browse files
committed
MAGETWO-55849: Customer can be deleted without Merchant permissions verification
1 parent 5435316 commit 1269d03

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

app/code/Magento/User/view/adminhtml/web/js/delete-user-account.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,25 @@
33
* See COPYING.txt for license details.
44
*/
55
define([
6-
"jquery"
7-
], function($){
6+
'jquery'
7+
], function ($) {
88
'use strict';
99

10+
var postData;
11+
1012
return function (params, elem) {
1113

12-
elem.on('click', function() {
13-
if ($.validator.validateElement($('[name="current_password"]'))) {
14-
var postData = {
15-
'data' : {
16-
'user_id': params.objId,
17-
'current_password': $('[name="current_password"]').val()
18-
}
14+
elem.on('click', function () {
15+
16+
postData = {
17+
'data': {
18+
'user_id': params.objId,
19+
'current_password': $('[name="current_password"]').val()
1920
}
20-
deleteConfirm(params.message, params.url, postData);
21+
};
22+
23+
if ($.validator.validateElement($('[name="current_password"]'))) {
24+
window.deleteConfirm(params.message, params.url, postData);
2125
}
2226
});
2327
}

0 commit comments

Comments
 (0)