def access_for(self, roles=None, actor=None, anchors=[]):
        """
        Return a proxy object that limits read and write access to attributes
        based on the actor's roles. If the ``roles`` parameter isn't
        provided, :meth:`roles_for` is called with the other parameters::

            # This typical call:
            obj.access_for(actor=current_auth.actor)
            # Is shorthand for:
            obj.access_for(roles=obj.roles_for(actor=current_auth.actor))
        """
        if roles is None:
            roles = self.roles_for(actor=actor, anchors=anchors)
        elif actor is not None or anchors:
            raise TypeError('If roles are specified, actor/anchors must not be specified')
        return RoleAccessProxy(self, roles=roles)
def access_for ( self , roles = None , actor = None , anchors = [ ] ) : if roles is None : roles = self . roles_for ( actor = actor , anchors = anchors ) elif actor is not None or anchors : raise TypeError ( 'If roles are specified, actor/anchors must not be specified' ) return RoleAccessProxy ( self , roles = roles )
Return a proxy object that limits read and write access to attributes
        based on the actor's roles. If the ``roles`` parameter isn't
        provided, :meth:`roles_for` is called with the other parameters::

            # This typical call:
            obj.access_for(actor=current_auth.actor)
            # Is shorthand for:
            obj.access_for(roles=obj.roles_for(actor=current_auth.actor))