diff options
author | Simo Sorce <simo@redhat.com> | 2014-10-06 23:22:10 -0400 |
---|---|---|
committer | Patrick Uiterwijk <puiterwijk@redhat.com> | 2014-10-07 16:48:22 +0200 |
commit | 3f7e6358c02d0822c5fe1c2da72a3b32ffe12ec6 (patch) | |
tree | 197bfdcce9da276be5f6d6a125ad17836f49d406 /ipsilon/admin | |
parent | 5fd2b52a5518864571afb9139074e4d314ec688c (diff) | |
download | ipsilon-3f7e6358c02d0822c5fe1c2da72a3b32ffe12ec6.tar.gz ipsilon-3f7e6358c02d0822c5fe1c2da72a3b32ffe12ec6.tar.xz ipsilon-3f7e6358c02d0822c5fe1c2da72a3b32ffe12ec6.zip |
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 <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Diffstat (limited to 'ipsilon/admin')
-rwxr-xr-x | ipsilon/admin/info.py | 4 | ||||
-rwxr-xr-x | ipsilon/admin/login.py | 4 | ||||
-rwxr-xr-x | ipsilon/admin/providers.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/ipsilon/admin/info.py b/ipsilon/admin/info.py index 8e910c7..4a8aaba 100755 --- a/ipsilon/admin/info.py +++ b/ipsilon/admin/info.py @@ -128,7 +128,7 @@ class InfoPlugins(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): @@ -142,4 +142,4 @@ class InfoPlugins(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 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 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 |