mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-15 05:16:28 +00:00
Update auth_permissions.md
This commit is contained in:
parent
c2785ad0b4
commit
3d955997a1
@ -114,7 +114,8 @@ if not user.is_admin:
|
|||||||
raise Unauthorized()
|
raise Unauthorized()
|
||||||
|
|
||||||
|
|
||||||
# Raise error if user does not have access to an enitty
|
# Raise error if user does not have access to control an entity
|
||||||
|
# Available policies: POLICY_READ, POLICY_CONTROL, POLICY_EDIT
|
||||||
if not user.permissions.check_entity(entity_id, POLICY_CONTROL):
|
if not user.permissions.check_entity(entity_id, POLICY_CONTROL):
|
||||||
raise Unauthorized()
|
raise Unauthorized()
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user