Skip to content
Snippets Groups Projects
Commit e4e6574e authored by Björn Schießle's avatar Björn Schießle
Browse files

allow admin to choose between client and server side encryption

parent 9bab0653
No related branches found
No related tags found
No related merge requests found
......@@ -21,4 +21,15 @@ $(document).ready(function(){
var checked=$('#enable_encryption').is(':checked');
OC.AppConfig.setValue('files_encryption','enable_encryption',(checked)?'true':'false');
})
$('input[name=encryption_mode]').change(function(){
var client=$('input[value="client"]:checked').val()
,server=$('input[value="server"]:checked').val()
,none=$('input[value="none"]:checked').val()
if (client)
OC.AppConfig.setValue('files_encryption','mode','client');
if (server)
OC.AppConfig.setValue('files_encryption','mode','server');
if (none)
OC.AppConfig.setValue('files_encryption','mode','none');
})
})
\ No newline at end of file
<form id="calendar">
<fieldset class="personalblock">
<strong>Choose encryption mode:</strong>
<p>
<input type="radio" name="encryption_mode" value="client" style="width:20px;" /> Client side encryption (most secure but makes it impossible to access your data from the web interface)<br />
<input type="radio" name="encryption_mode" value="server" style="width:20px;" /> Server side encryption (allows you to access your files from the web interface and the desktop client)<br />
<input type="radio" name="encryption_mode" value="none" style="width:20px; checked="checked" /> None (no encryption at all)<br/>
</p>
<p>
<strong><?php echo $l->t('Encryption'); ?></strong>
<?php echo $l->t("Exclude the following file types from encryption"); ?>
<select id='encryption_blacklist' title="<?php echo $l->t('None')?>" multiple="multiple">
......@@ -7,6 +16,6 @@
<option selected="selected" value="<?php echo $type;?>"><?php echo $type;?></option>
<?php endforeach;?>
</select>
<input type='checkbox' id='enable_encryption' <?php if($_['encryption_enabled']){echo 'checked="checked"';} ?>></input><label for='enable_encryption'><?php echo $l->t('Enable Encryption')?></label>
</p>
</fieldset>
</form>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment