Module: check_mk
Branch: master
Commit: 55ab63ef922046b82780fe844404b9b9c1c3a226
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=55ab63ef922046…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 3 16:19:26 2016 +0100
Convert recent patch to new config API
config.may -> config.user.may
---
web/htdocs/views.py | 2 +-
web/plugins/views/availability.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 862c117..1d163e5 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2219,7 +2219,7 @@ def show_context_links(thisview, show_filters,
bestof = config.context_buttons_to_show)
# Button for creating an instant report (if reporting is available)
- if config.reporting_available() and config.may("general.reporting"):
+ if config.reporting_available() and
config.user.may("general.reporting"):
html.context_button(_("Export as PDF"), html.makeuri([],
filename="report_instant.py"), "report")
# Buttons to other views, dashboards, etc.
diff --git a/web/plugins/views/availability.py b/web/plugins/views/availability.py
index 8591b20..22b0d92 100644
--- a/web/plugins/views/availability.py
+++ b/web/plugins/views/availability.py
@@ -221,7 +221,7 @@ def render_availability_page(view, datasource, filterheaders,
only_sites, limit)
html.begin_context_buttons()
togglebutton("avoptions", html.has_user_errors(),
"painteroptions", _("Configure details of the report"))
html.context_button(_("Status View"), html.makeuri([("mode",
"status")]), "status")
- if config.reporting_available() and config.may("general.reporting"):
+ if config.reporting_available() and
config.user.may("general.reporting"):
html.context_button(_("Export as PDF"), html.makeuri([],
filename="report_instant.py"), "report")
if av_mode == "table":
@@ -510,7 +510,7 @@ def render_bi_availability(title, aggr_rows):
html.begin_context_buttons()
togglebutton("avoptions", False, "painteroptions",
_("Configure details of the report"))
html.context_button(_("Status View"), html.makeuri([("mode",
"status")]), "status")
- if config.reporting_available() and config.may("general.reporting"):
+ if config.reporting_available() and
config.user.may("general.reporting"):
html.context_button(_("Export as PDF"), html.makeuri([],
filename="report_instant.py"), "report")
if av_mode == "availability":
html.context_button(_("Export as CSV"),
html.makeuri([("output_format", "csv_export")]),
"download_csv")