Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"View Only" Web UI feature request #3539

Open
paulplac opened this issue Jul 27, 2022 · 2 comments
Open

"View Only" Web UI feature request #3539

paulplac opened this issue Jul 27, 2022 · 2 comments
Labels
enhancement New feature or request pinned

Comments

@paulplac
Copy link

Describe what you are trying to accomplish and why in non technical terms
I would love a "view only" WEB UI that I could allow my family to access without being able to delete events, turn off detection's or expose camera passwords.

Describe the solution you'd like
An option to disable/hide the following:
-Delete button on events page
-Toggle buttons on camera page
-Debug page (at least hide "config" section so that camera passwords are not exposed)

Describe alternatives you've considered
I love the Web UI. I don't run HA, but did try it out as an alternate solution. HA does not offer the same simplicity and features as the UI (slow to load cameras and viewing events for all cameras is clunky compared to the Web UI events page).

Additional context
Either an option to toggle the "view only" Web UI in the config file or an ability to log in with different permissions would be fantastic.
Currently I have openhab send push notification to my phone which link back to the Web UI via reverse proxy.

@kzkvv
Copy link

kzkvv commented Nov 16, 2023

Hi! I have the same problem and I found a dirty workaround. It disables all visible delete/modify actions on backend side.

Disclaimer: I know that what I will write next is a kind of crime against the open-source community. It will be better to contribute and add this feature instead of writing this comment. But I think this workaround will help for some people for whom is really important to have read-only access to Frigate UI right now.

Backend part of Frigate is written in python, which is an interpreted programming language. It means that you can modify source code on the fly, restart Frigate and your changes will be applied immediatly.

This workaround works with docker-compose deploy and Frigate 0.12.1:

  1. Specify the image version explicitly in docker-compose
  2. Pull Frigate sources
  3. Checkout master branch, reset local commit history to release tag
  4. Modify source files. You can check changes in my branch disables toggles, restart, events deletion and any config changes from UI in 0.12.1: master...kzkvv:frigate:read-only-example
  5. Copy modified files from source code to the folder-near-docker-compose
  6. Bind all files using "volumes" section
      - ./folder-near-docker-compose/dispatcher.py:/opt/frigate/frigate/comms/dispatcher.py
      - ./folder-near-docker-compose/http.py:/opt/frigate/frigate/http.py
  1. Restart container with Frigate

P.S. You can also develop or fix some part of code on-the fly using the same flow

@ristomatti
Copy link

ristomatti commented Aug 31, 2024

A slightly less intrusive but limited method would be to block calls to specific API endpoints on a firewall level. Based on quick testing in DevTools, it appears the UI works fine even if requests to /api/reviews are blocked. If access to reviews is something you want to share, only blockPOST requests. Similarly it seems possible to prevent saving settings. Leaking settings/passwords could not easily be done this way as all the settings are fetched right after logging in and the cameras won't load without it.

Preventing leaking camera passwors can however be avoided by proxying the cameras from a separately installed Go2RTC (or MediaMTX instance).

Edit: Or simpler yet, use a different URL for sharing and do the above in the HTTP proxy level as suggested here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pinned
Projects
None yet
Development

No branches or pull requests

4 participants