projects
/
cascardo
/
ipsilon.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Redirect anonymous users away
[cascardo/ipsilon.git]
/
ipsilon
/
util
/
page.py
diff --git
a/ipsilon/util/page.py
b/ipsilon/util/page.py
index
10f10aa
..
aa075de
100755
(executable)
--- a/
ipsilon/util/page.py
+++ b/
ipsilon/util/page.py
@@
-34,6
+34,16
@@
def admin_protect(fn):
return check
return check
+def auth_protect(fn):
+ def check(self, *args, **kwargs):
+ if UserSession().get_user().is_anonymous:
+ raise cherrypy.HTTPRedirect(self.basepath)
+ else:
+ return fn(self, *args, **kwargs)
+
+ return check
+
+
class Page(Log):
def __init__(self, site, form=False):
if 'template_env' not in site:
class Page(Log):
def __init__(self, site, form=False):
if 'template_env' not in site: