mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
confirmation box added for user removal
This commit is contained in:
@@ -37,6 +37,18 @@ export class OrgUsersCtrl {
|
||||
}
|
||||
|
||||
removeUser(user) {
|
||||
this.$scope.appEvent('confirm-modal', {
|
||||
title: 'Confirm delete user',
|
||||
text: 'Are you sure you want to delete user ' + user.login + '?',
|
||||
yesText: "Delete",
|
||||
icon: "fa-warning",
|
||||
onConfirm: () => {
|
||||
this.removeUserConfirmed(user);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
removeUserConfirmed(user) {
|
||||
this.backendSrv.delete('/api/org/users/' + user.userId)
|
||||
.then(() => {
|
||||
this.get();
|
||||
|
||||
Reference in New Issue
Block a user