diff options
author | Sam Tuke <samtuke@owncloud.com> | 2013-05-04 16:14:38 +0200 |
---|---|---|
committer | Sam Tuke <samtuke@owncloud.com> | 2013-05-04 16:14:38 +0200 |
commit | c8946ea6086c642a5c367f2e5f63d58bc185c331 (patch) | |
tree | aacba56be830d53517a958a222470414b1297d79 /apps/files_encryption/js | |
parent | 9605d14a17522dd47c760a1c37a0374cfb0551b9 (diff) | |
download | nextcloud-server-c8946ea6086c642a5c367f2e5f63d58bc185c331.tar.gz nextcloud-server-c8946ea6086c642a5c367f2e5f63d58bc185c331.zip |
Added support for user-specified password for adminRecovery account in admin settings page
Made encryptAll() (file migration for unencrypted + legacy encrypted files) run only on first login for each user (status stored in DB)
Made recoveryAdmin user member of 'admin' user group automatically
Set recoveryadmin settings to only display on user settings if enabled by an admin
Updated encryption db xml schema
Diffstat (limited to 'apps/files_encryption/js')
-rw-r--r-- | apps/files_encryption/js/settings-admin.js | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/apps/files_encryption/js/settings-admin.js b/apps/files_encryption/js/settings-admin.js index 48b5598d524..8e9c8c22306 100644 --- a/apps/files_encryption/js/settings-admin.js +++ b/apps/files_encryption/js/settings-admin.js @@ -19,14 +19,24 @@ $(document).ready(function(){ function() { var recoveryStatus = $( this ).val(); + var recoveryPassword = $( '#recoveryPassword' ).val(); - $.post( - OC.filePath( 'files_encryption', 'ajax', 'adminrecovery.php' ) - , { adminEnableRecovery: recoveryStatus, recoveryPassword: 'password' } - , function( data ) { - alert( data ); - } - ); + if ( '' == recoveryPassword ) { + + // FIXME: add proper OC notification + alert( 'You must set a recovery account password first' ); + + } else { + + $.post( + OC.filePath( 'files_encryption', 'ajax', 'adminrecovery.php' ) + , { adminEnableRecovery: recoveryStatus, recoveryPassword: recoveryPassword } + , function( data ) { + alert( data ); + } + ); + + } } ); |