コード例 #1
0
    def __init__(self):
        """Initialization
        """
        super(Publisher, self).__init__()

        local.worker = local.Thread()
        local.request = local.Thread()
コード例 #2
0
def set_context(user=None):
    """ """
    local.request = local.Thread()
    security.set_user(user)
    security.set_manager(SecurityManager('somekey'))
コード例 #3
0
def set_dummy_context():
    """Set a dummy context for security permission checks
    """
    local.request = local.Thread()
    security.set_user(None)
    security.set_manager(DummySecurityManager())