Implement "read-only db" settings

Allow to set dbs as read-only, to prevent accidental changes. This needs to be done, when we can potentially add and modify entries.