enforced admin privileges on endpoint pages

This commit is contained in:
gabryon99 2020-05-13 18:26:01 +02:00
parent ac03865c01
commit 237309fc58
7 changed files with 28 additions and 36 deletions

View file

@ -13,9 +13,8 @@ local json = require "dkjson"
sendHTTPContentTypeHeader('application/json')
if (not isAdministrator()) then
traceError(TRACE_ERROR, TRACE_CONSOLE, "The user doesn't have the privileges to get notification endpoint recipients!")
reportError("The user doesn't have the privileges to get notification endpoint recipients!")
if not haveAdminPrivileges(true) then
return
end
local recipients = notification_recipients.get_recipients()