Skip to content
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

Get user information and prevent using admin-only calls #3417

Merged
merged 3 commits into from
Mar 16, 2023

Conversation

jpelgrom
Copy link
Member

@jpelgrom jpelgrom commented Mar 11, 2023

Summary

Get informaton about the current user and cache it in the database alongside the server. Information is periodically updated, when the registration is synced.

Use information about whether the user is an admin or not to:

Screenshots

n/a

Link to pull request in Documentation repository

n/a

Any other notes

 - Add function to get information about the current user
 - Cache user information alongside server in database
Copy link
Collaborator

@JBassett JBassett left a comment

Choose a reason for hiding this comment

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

Looks good, just needs merge conflicts fixed.

@JBassett JBassett enabled auto-merge (squash) March 15, 2023 23:18
# Conflicts:
#	app/src/full/java/io/homeassistant/companion/android/launch/LaunchPresenterImpl.kt
#	app/src/minimal/java/io/homeassistant/companion/android/launch/LaunchPresenterImpl.kt
@JBassett JBassett merged commit 8d2c9f1 into home-assistant:master Mar 16, 2023
@jpelgrom jpelgrom deleted the auth-current-user branch March 16, 2023 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error handling message: Unauthorized (unauthorized) - subscribe_trigger requires admin
2 participants