george hu wrote: > According to the document, "A common thing to want to do is to attach an > __acl__ to the context object dynamically for declarative security > purposes", I moved __acl__ statement from RootFactory class to the Page > class, as in the following code: > > class Page(Base): > __tablename__='pages' > id = Column(Integer, primary_key=True) > name = Column(Text, unique = True) > data = Column(Text) > > def __init__(self,name,data): > self.name <http://self.name> = name > self.data = data > * self.__acl__=[(Allow,Everyone,'view'),(Allow,'editor','edit')]* > > but it doesn't serve the purpose. What's wrong with my code?
Hi George, Have you read http://docs.repoze.org/bfg/1.1/narr/urldispatch.html#using-repoze-bfg-security-with-url-dispatch ? - C _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev