server/checkintegrity.py
branchstable
changeset 7685 902909e5f733
parent 7684 9f8f8096d64b
child 7686 6580b5a0f1cf
equal deleted inserted replaced
7684:9f8f8096d64b 7685:902909e5f733
   342     """
   342     """
   343     session = repo._get_session(cnx.sessionid, setcnxset=True)
   343     session = repo._get_session(cnx.sessionid, setcnxset=True)
   344     # yo, launch checks
   344     # yo, launch checks
   345     if checks:
   345     if checks:
   346         eids_cache = {}
   346         eids_cache = {}
   347         with security_enabled(session, read=False): # ensure no read security
   347         with security_enabled(session, read=False, write=False): # ensure no read security
   348             for check in checks:
   348             for check in checks:
   349                 check_func = globals()['check_%s' % check]
   349                 check_func = globals()['check_%s' % check]
   350                 check_func(repo.schema, session, eids_cache, fix=fix)
   350                 check_func(repo.schema, session, eids_cache, fix=fix)
   351         if fix:
   351         if fix:
   352             cnx.commit()
   352             cnx.commit()