In the chapter of "Add authorization",  we create a root factory in
the model.py,

class RootFactory(object):
    __acl__ = [ (Allow, Everyone, 'view'), (Allow, 'editor', 'edit') ]
    def __init__(self, environ):
        self.__dict__.update(environ['bfg.routes.matchdict'])


My question is the constructor here, I don't understand why there is a
need to update the environ key of matchdict. I tried to print the the
value before and after the update, they are just the same. And I've
also tried to change the line to pass, the program worked without any
issue. I don't quite understand the purpose of this code here.
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to