From 73eeae98716c0e25f31cdb2c347c1939525d6ef7 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 3 Oct 2014 13:24:37 -0400 Subject: Redirect anonymous users away It makes no sense to let anonymous users interact with the admin pages so tighten up access and redirect away users that have no rights. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/admin/providers.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ipsilon/admin/providers.py') diff --git a/ipsilon/admin/providers.py b/ipsilon/admin/providers.py index ba5e1e7..8219880 100755 --- a/ipsilon/admin/providers.py +++ b/ipsilon/admin/providers.py @@ -20,6 +20,7 @@ import cherrypy from ipsilon.util.page import Page +from ipsilon.util.page import admin_protect, auth_protect from ipsilon.providers.common import FACILITY from ipsilon.admin.common import AdminPluginPage @@ -56,9 +57,11 @@ class ProviderPlugins(Page): enabled=enabled_plugins, menu=self._master.menu) + @auth_protect def root(self, *args, **kwargs): return self.root_with_msg() + @admin_protect def enable(self, plugin): msg = None plugins = self._site[FACILITY] @@ -72,6 +75,7 @@ class ProviderPlugins(Page): return self.root_with_msg(msg, "success") enable.exposed = True + @admin_protect def disable(self, plugin): msg = None plugins = self._site[FACILITY] -- cgit