aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-14 12:51:19 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-14 12:51:19 +0000
commitc721be33130b9ce461146d0ce5115197817a60ba (patch)
tree90aa1b8b63df45c92cad3334924086d3c119bfab /src
parente39b0648ec06a9795a915d1a2c8b1e1cfe370b7d (diff)
downloadrspamd-c721be33130b9ce461146d0ce5115197817a60ba.tar.gz
rspamd-c721be33130b9ce461146d0ce5115197817a60ba.zip
[WebUI] Distinguish read-only interface, multiple bugs fixed
Diffstat (limited to 'src')
-rw-r--r--src/controller.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/controller.c b/src/controller.c
index d19ab2260..da0f44dce 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -442,8 +442,8 @@ rspamd_controller_check_forwarded (struct rspamd_controller_session *session,
}
/* Check for password if it is required by configuration */
-static gboolean rspamd_controller_check_password(
- struct rspamd_http_connection_entry *entry,
+static gboolean
+rspamd_controller_check_password (struct rspamd_http_connection_entry *entry,
struct rspamd_controller_session *session,
struct rspamd_http_message *msg, gboolean is_enable)
{
@@ -678,6 +678,8 @@ rspamd_controller_handle_auth (struct rspamd_http_connection_entry *conn_ent,
st->messages_scanned), "scanned", 0, false);
ucl_object_insert_key (obj, ucl_object_fromint (
st->messages_learned), "learned", 0, false);
+ ucl_object_insert_key (obj, ucl_object_frombool (!session->is_enable),
+ "read_only", 0, false);
rspamd_controller_send_ucl (conn_ent, obj);
ucl_object_unref (obj);