Add per-user history logging toggle. Uncheck to disable history logging for specific user.

On SSL cert bypass check that the method is available before allowing.
This commit is contained in:
Tim 2015-08-13 23:05:09 +02:00
parent b0ded77571
commit 0877a6bf21
6 changed files with 61 additions and 15 deletions

View file

@ -14,6 +14,7 @@ user Return the real Plex username
user_id Return the Plex user_id
friendly_name Returns the friendly edited Plex username
do_notify Returns bool value for whether the user should trigger notifications
keep_history Returns bool value for whether the user's activity should be logged
DOCUMENTATION :: END
</%doc>
@ -42,6 +43,12 @@ DOCUMENTATION :: END
</label>
<p class="help-block">Uncheck this if you do not want to receive notifications for this user's activity.</p>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="keep_history" name="keep_history" value="1" ${data['keep_history']}> Keep history
</label>
<p class="help-block">Uncheck this if you do not want this keep any history on this user's activity.</p>
</div>
</fieldset>
</div>
<div class="modal-footer">
@ -57,14 +64,18 @@ DOCUMENTATION :: END
$("#save_user_name").click(function() {
var friendly_name = $("#friendly_name").val();
var do_notify = 0;
var keep_history = 0;
if ($("#do_notify").is(":checked")) {
do_notify = 1;
}
if ($("#keep_history").is(":checked")) {
keep_history = 1;
}
% if data['user_id']:
$.ajax({
url: 'edit_user',
data: {user_id: '${data['user_id']}', friendly_name: friendly_name, do_notify: do_notify},
data: {user_id: '${data['user_id']}', friendly_name: friendly_name, do_notify: do_notify, keep_history: keep_history},
cache: false,
async: true,
success: function(data) {
@ -77,7 +88,7 @@ DOCUMENTATION :: END
% else:
$.ajax({
url: 'edit_user',
data: {user: '${data['user']}', friendly_name: friendly_name, do_notify: do_notify},
data: {user: '${data['user']}', friendly_name: friendly_name, do_notify: do_notify, keep_history: keep_history},
cache: false,
async: true,
success: function(data) {