Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Add permission and feature checking, improve is_admin #95

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AT0myks
Copy link

@AT0myks AT0myks commented Sep 28, 2022

Permissions methods are unused for now, but will be in a future PR.

For the is_admin changes, the await will need to be removed here.
Also, I know that the logging in this method is here for Home Assistant, but ideally I think it should be moved to reolink_dev (since it is the actual custom component and reolink is the library it uses) and is_admin could then simply return user["level"] == "admin".

AT0myks added 3 commits July 28, 2022 03:50
- make it return a boolean
- use list comprehension instead of loop
- it doesn't need to be async
and use it to detect PTZ support.
I did not create this logic, just adapted it from pce.js.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant