diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-10-22 18:09:40 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-10-22 18:10:29 +0200 |
commit | 00f4928866bfdf824e5c9d4cab248646442bc518 (patch) | |
tree | 7c3d470935a25ae24d666d40729fbcc488efa215 /settings/js | |
parent | cadd71ec8a02fc5619a9347109f9e588e13b3e3b (diff) | |
download | nextcloud-server-00f4928866bfdf824e5c9d4cab248646442bc518.tar.gz nextcloud-server-00f4928866bfdf824e5c9d4cab248646442bc518.zip |
Added warning notification when user home already exists
When creating a user and the home already exists in the data dir, a
warning notification will be displayed.
Fixes #5161
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/users.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/settings/js/users.js b/settings/js/users.js index 5b7802c1e36..4c2ad5417ca 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -467,6 +467,18 @@ $(document).ready(function () { var addedGroups = result.data.groups; UserList.availableGroups = $.unique($.merge(UserList.availableGroups, addedGroups)); } + if (result.data.homeExists){ + OC.Notification.hide(); + OC.Notification.show(t('settings', 'Warning: Home directory for user "{user}" already exists', {user: result.data.username})); + if (UserList.notificationTimeout){ + window.clearTimeout(UserList.notificationTimeout); + } + UserList.notificationTimeout = window.setTimeout( + function(){ + OC.Notification.hide(); + UserList.notificationTimeout = null; + }, 10000); + } if($('tr[data-uid="' + username + '"]').length === 0) { UserList.add(username, username, result.data.groups, null, 'default', true); } |