server/session.py
branchstable
changeset 7500 cb0f4da64e86
parent 7451 48ba5f0c11de
child 7502 e7190f7e850e
equal deleted inserted replaced
7499:96412cfc28e2 7500:cb0f4da64e86
    71 def is_internal_session(cls, req, **kwargs):
    71 def is_internal_session(cls, req, **kwargs):
    72     """repository side only selector returning 1 if the session is not a regular
    72     """repository side only selector returning 1 if the session is not a regular
    73     user session but an internal session
    73     user session but an internal session
    74     """
    74     """
    75     return req.is_internal_session
    75     return req.is_internal_session
       
    76 
       
    77 @objectify_selector
       
    78 def repairing(cls, req, **kwargs):
       
    79     """repository side only selector returning 1 if the session is not a regular
       
    80     user session but an internal session
       
    81     """
       
    82     return req.vreg.config.repairing
    76 
    83 
    77 
    84 
    78 class transaction(object):
    85 class transaction(object):
    79     """context manager to enter a transaction for a session: when exiting the
    86     """context manager to enter a transaction for a session: when exiting the
    80     `with` block on exception, call `session.rollback()`, else call
    87     `with` block on exception, call `session.rollback()`, else call