fava-option to disable editor
We use Beancount for maintaining our company's financial accounts. We edit the Beancount input file using text editors, and use Gerrit (git based code review system) to review changes to it (and to also automatically run bean-check to verify that it's consistent).
So far we've been using the bean-web UI that was a part of Beancount, but that's removed in newer versions and users are being asked to try Fava for a web UI. Fava looks good and we've configured it as we want it, except we also want a way to disable the built-in editor. The ledger's web UI is visited by many parties including staff from our CPA's office. We don't want anyone to be able to make changes using the web UI - we want all changes to go through the Gerrit code review system. This worked well with bean-web which was a read-only view. But Fava allows edits.
I cannot find a configurable way to disable the editor. If this functionality is missing, please can you add it?
If you want Fava to work read-only, I'd suggest simply marking your Beancount files as readonly (this is what the demo at fava.pythonanywhere.com does). Alternatively, you could use something like systemd to only allow Fava a readonly access to the file system.
If you want Fava to work read-only, I'd suggest simply marking your Beancount files as readonly (this is what the demo at fava.pythonanywhere.com does). Alternatively, you could use something like systemd to only allow Fava a readonly access to the file system.
Thank you. In the git repo that Fava serves from on the webserver, I updated the post-merge and post-checkout git hooks to make a copy of the Beancount input file and set its mode as 0444, and pointed Fava at the copy. The Editor link still shows up in the UI's sidebar, but modifying and attempting to save causes a permission error. It is a satisfactory workaround.
I suggest leaving this ticket open to implement a fava-option that disables the editor (with the link in the sidebar, etc.)
I'll close this issue - I'm not planning to add an option for this myself. I think even with a readonly file the editor should be available to the user (as a read-only viewer). A PR to improve the UX of Fava with readonly files would be welcome of course :)