import logging
from bluechips.lib.base import *
+from bluechips.lib.permissions import BlueChipResident
import sqlalchemy
from sqlalchemy import orm
+from authkit.authorize.pylons_adaptors import authorize
+
from pylons import request
from pylons.decorators import validate
from pylons.decorators.secure import authenticate_form
class UserController(BaseController):
+ def index(self):
+ c.title = 'User Settings'
+ return render('/user/index.mako')
+
def email(self):
c.title = 'User Settings'
return render('/user/email.mako')
h.flash("Updated email address to '%s'." % new_email)
return h.redirect_to('/')
+ @authorize(BlueChipResident())
def new(self):
c.title = 'Register a New User'
return render('/user/new.mako')
@authenticate_form
+ @authorize(BlueChipResident())
@validate(schema=NewUserSchema(), form='new')
def create(self):
u = model.User(username=self.form_result['username'],