The generator does not need to write to the database at all. Therefore
we can tell the driver to open it in read-only mode to be able to
generate reports from any user that is allowed to read from the
database, but not write to it (i.e. the web UI).
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
self.path = path
# Open the database
- self.db = sqlite3.connect(path)
+ self.db = sqlite3.connect("file://%s?mode=ro" % path, uri=True)
self.db.row_factory = row_factory
# Load a default stylesheet for our document