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/providers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipsilon/admin/providers.py') diff --git a/ipsilon/admin/providers.py b/ipsilon/admin/providers.py index 8219880..31e11ef 100755 --- a/ipsilon/admin/providers.py +++ b/ipsilon/admin/providers.py @@ -73,7 +73,7 @@ class ProviderPlugins(Page): obj.enable(self._site) 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): @@ -87,4 +87,4 @@ class ProviderPlugins(Page): obj.disable(self._site) msg = "Plugin %s disabled" % obj.name return self.root_with_msg(msg, "success") - disable.exposed = True + disable.public_function = True -- cgit