@@ -0,0 +1,798 @@
+%22%22%22Test Secure Controller%22%22%22%0Afrom testtg.lib.base import BaseController, SecureController%0Afrom tg import expose, flash%0Afrom pylons.i18n import ugettext as _%0A#from tg import redirect, validate%0A#from testtg.model import DBSession, metadata%0A#from dbsprockets.dbmechanic.frameworks.tg2 import DBMechanic%0A#from dbsprockets.saprovider import SAProvider%0Afrom tg.ext.repoze.who import authorize%0A%0A%0Aclass Secc(SecureController):%0A%0A    require = authorize.has_permission('manage')%0A%0A    @expose('testtg.templates.index')%0A    def index(self):%0A        flash(_(%22Secure Controller here%22))%0A        return dict(page='index')%0A%0A    @expose('testtg.templates.index')%0A    def some_where(self):%0A        %22%22%22should be protected because of the require attr%0A        at the controller level.%0A        %22%22%22%0A        return dict()%0A%0A

Add a boilerplate SecureController