from spline.lib.plugin import PluginBase
from spline.lib.plugin import PluginBase, PluginLink, Priority
-import spline.model as model
import spline.model.meta as meta
import splinext.users.controllers.accounts
import splinext.users.controllers.users
-import splinext.users.model
+from splinext.users import model as users_model
def add_routes_hook(map, *args, **kwargs):
"""Hook to inject some of our behavior into the routes configuration."""
c.
"""
- c.user = None
-
if not 'user_id' in session:
+ c.user = users_model.AnonymousUser()
return
- user = meta.Session.query(model.User).get(session['user_id'])
+ user = meta.Session.query(users_model.User).get(session['user_id'])
if not user:
# Bogus id in the session somehow. Clear it
del session['user_id']
session.save()
+
+ c.user = users_model.AnonymousUser()
return
c.user = user
users = splinext.users.controllers.users.UsersController,
)
- def model(self):
- return [
- splinext.users.model.User,
- splinext.users.model.OpenID,
- ]
-
def template_dirs(self):
return [
(resource_filename(__name__, 'templates'), Priority.NORMAL)