fwestenberg / reolink

Python Reolink package
MIT License
86 stars 24 forks source link

Add permission and feature checking, improve is_admin #95

Open AT0myks opened 2 years ago

AT0myks commented 2 years ago

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".