From 67d98ba3daea9e6f4f7f4f05b7be3466111d3608 Mon Sep 17 00:00:00 2001 From: Gael Pasgrimaud Date: Thu, 16 Jun 2011 19:02:30 +0200 Subject: [PATCH] fix tests --- pyramidapp/pyramidapp/models.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyramidapp/pyramidapp/models.py b/pyramidapp/pyramidapp/models.py index dc981d8..b9a145d 100644 --- a/pyramidapp/pyramidapp/models.py +++ b/pyramidapp/pyramidapp/models.py @@ -14,7 +14,7 @@ from sqlalchemy.orm import scoped_session from sqlalchemy.orm import sessionmaker from zope.sqlalchemy import ZopeTransactionExtension -from pyramid.security import Allow, ALL_PERMISSIONS +from pyramid.security import Allow, Authenticated, ALL_PERMISSIONS DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension())) Base = declarative_base() @@ -27,6 +27,12 @@ class MyModel(Base): class Foo(Base): __tablename__ = 'foo' + __acl__ = [ + (Allow, 'admin', ALL_PERMISSIONS), + (Allow, Authenticated, 'view'), + (Allow, 'editor', 'edit'), + (Allow, 'manager', ('new', 'edit', 'delete')), + ] id = Column(Integer, primary_key=True) bar = Column(Unicode(255))