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

Add permissions check in service helper #18596

Merged
merged 6 commits into from Nov 21, 2018

Conversation

Projects
None yet
4 participants
@balloob
Member

balloob commented Nov 20, 2018

Description:

This is the first step (of many), to verify entity permissions. This is done by adding the permission check for entity control in the entity service helper.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@balloob balloob requested a review from home-assistant/core as a code owner Nov 20, 2018

@wafflebot wafflebot bot added the in progress label Nov 20, 2018

from tests.common import get_test_home_assistant, mock_service, mock_coro
@pytest.fixture

This comment has been minimized.

@houndci-bot

houndci-bot Nov 20, 2018

expected 2 blank lines, found 1

@MartinHjelmare

I don't see anything obviously wrong.

@@ -3,6 +3,7 @@
import pytest
from homeassistant.auth.const import GROUP_ID_ADMIN, GROUP_ID_READ_ONLY

This comment has been minimized.

@houndci-bot

houndci-bot Nov 21, 2018

'homeassistant.auth.const.GROUP_ID_READ_ONLY' imported but unused

balloob added some commits Nov 21, 2018

@balloob balloob merged commit 36c31a6 into dev Nov 21, 2018

6 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.009%) to 93.029%
Details

@wafflebot wafflebot bot removed the in progress label Nov 21, 2018

@balloob balloob deleted the perm-service branch Nov 21, 2018

mxworm added a commit to mxworm/home-assistant that referenced this pull request Nov 21, 2018

Merge branch 'dev' of https://github.com/home-assistant/home-assistant
…into dev

* 'dev' of https://github.com/home-assistant/home-assistant:
  Upgrade requests to 2.20.1 (home-assistant#18615)
  Fix mqtt cover inverted (home-assistant#18456)
  Update locationsharinglib requirement to 3.0.8 (home-assistant#18612)
  Add support for Panasonic Blu-Ray players (home-assistant#18541)
  Add support for HTTPS and basic HTTP authentication for Glances (home-assistant#18608)
  Add permissions check in service helper (home-assistant#18596)
  Upgrade blinkpy to 0.10.3 (Fixes home-assistant#18341) (home-assistant#18603)

@balloob balloob referenced this pull request Nov 29, 2018

Merged

0.83 #18776

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment