Skip to content

User management#15420

Merged
balloob merged 5 commits intodevfrom
user-management
Jul 13, 2018
Merged

User management#15420
balloob merged 5 commits intodevfrom
user-management

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Jul 11, 2018

# We should first merge #15335 (comment) Merged #15443 instead

Description:

Allow managing users via API. Only owners are allowed to use this API.

image

image

image

Related issue (if applicable): fixes #15194

Example entry for configuration.yaml (if applicable):

https://developers.home-assistant.io/blog/2018/07/02/trying-new-auth.html

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If the code does not interact with devices:

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

@@ -0,0 +1,111 @@
:"""Offer API to configure Home Assistant auth."""
from homeassistant.core import callback
from homeassistant.components import websocket_api
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module level import not at top of file

@@ -0,0 +1,111 @@
:"""Offer API to configure Home Assistant auth."""
from homeassistant.core import callback
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module level import not at top of file

@@ -0,0 +1,111 @@
:"""Offer API to configure Home Assistant auth."""
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing whitespace after ':'
SyntaxError: invalid syntax

data = hass_auth.Data(hass)
loop.run_until_complete(data.async_load())
loop.run_until_complete(args.func(data, args))
loop.run_until_complete(hass, args.func(data, args))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command line seems broken. Should this be loop.run_until_complete(args.func(hass, data, args))?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes.

awarecan added a commit to awarecan/home-assistant that referenced this pull request Jul 13, 2018

await script_auth.validate_login(
data, Mock(username='invalid-user', password='test-pass'))
hass, provider, data, Mock(username='invalid-user', password='test-pass'))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)


await script_auth.validate_login(
data, Mock(username='test-user', password='invalid-pass'))
hass, provider, data, Mock(username='test-user', password='invalid-pass'))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

@balloob balloob merged commit 70fe463 into dev Jul 13, 2018
@ghost ghost removed the in progress label Jul 13, 2018
@balloob balloob deleted the user-management branch July 13, 2018 13:31
awarecan pushed a commit to awarecan/home-assistant that referenced this pull request Jul 16, 2018
* User management

* Lint

* Fix dict

* Reuse data instance

* OrderedDict all the way
@balloob balloob mentioned this pull request Jul 20, 2018
michaeldavie pushed a commit to michaeldavie/home-assistant that referenced this pull request Jul 31, 2018
* User management

* Lint

* Fix dict

* Reuse data instance

* OrderedDict all the way
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
* User management

* Lint

* Fix dict

* Reuse data instance

* OrderedDict all the way
@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add frontend for managing users for the home assistant auth provider

4 participants