From 3f7e6358c02d0822c5fe1c2da72a3b32ffe12ec6 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 6 Oct 2014 23:22:10 -0400 Subject: Fix exposed functions The Page util is supposed to intercept and enable exposed pages on its own so that additional functions can be run in the generic __call__ Fix the code to check for the function argument correctly and use a different argument than the standard cherrypy one for admin pages so that we do actually land in the Page.__call__ all the time for those pages. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/admin/login.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipsilon/admin/login.py') diff --git a/ipsilon/admin/login.py b/ipsilon/admin/login.py index 16489f1..165b4ab 100755 --- a/ipsilon/admin/login.py +++ b/ipsilon/admin/login.py @@ -161,7 +161,7 @@ class LoginPlugins(Page): save_enabled_plugins(list(x.name for x in plugins['enabled'])) msg = "Plugin %s enabled" % obj.name return self.root_with_msg(msg, "success") - enable.exposed = True + enable.public_function = True @admin_protect def disable(self, plugin): @@ -176,4 +176,4 @@ class LoginPlugins(Page): save_enabled_plugins(list(x.name for x in plugins['enabled'])) msg = "Plugin %s disabled" % obj.name return self.root_with_msg(msg, "success") - disable.exposed = True + disable.public_function = True -- cgit