projects
/
zzz-spline-users.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a fake guest user class; stubbed out permissions.
[zzz-spline-users.git]
/
splinext
/
users
/
__init__.py
diff --git
a/splinext/users/__init__.py
b/splinext/users/__init__.py
index
73f2029
..
a6a6ca7
100644
(file)
--- a/
splinext/users/__init__.py
+++ b/
splinext/users/__init__.py
@@
-31,9
+31,8
@@
def check_userid_hook(action, **params):
c.
"""
c.
"""
- c.user = None
-
if not 'user_id' in session:
if not 'user_id' in session:
+ c.user = users_model.AnonymousUser()
return
user = meta.Session.query(users_model.User).get(session['user_id'])
return
user = meta.Session.query(users_model.User).get(session['user_id'])
@@
-41,6
+40,8
@@
def check_userid_hook(action, **params):
# Bogus id in the session somehow. Clear it
del session['user_id']
session.save()
# Bogus id in the session somehow. Clear it
del session['user_id']
session.save()
+
+ c.user = users_model.AnonymousUser()
return
c.user = user
return
c.user = user