diff --git a/modules/users/client/controllers/admin/user.client.controller.js b/modules/users/client/controllers/admin/user.client.controller.js index 197a44eef1..8c4a1bb04b 100644 --- a/modules/users/client/controllers/admin/user.client.controller.js +++ b/modules/users/client/controllers/admin/user.client.controller.js @@ -14,6 +14,7 @@ vm.user = user; vm.remove = remove; vm.update = update; + vm.isContextUserSelf = isContextUserSelf; function remove(user) { if ($window.confirm('Are you sure you want to delete this user?')) { @@ -46,5 +47,9 @@ vm.error = errorResponse.data.message; }); } + + function isContextUserSelf() { + return vm.user.username === vm.authentication.user.username; + } } }()); diff --git a/modules/users/client/views/admin/view-user.client.view.html b/modules/users/client/views/admin/view-user.client.view.html index 2ab3272884..3b947f2fb9 100644 --- a/modules/users/client/views/admin/view-user.client.view.html +++ b/modules/users/client/views/admin/view-user.client.view.html @@ -8,7 +8,7 @@
- +