refactor: improve handling of permissions, users, and settings#278
refactor: improve handling of permissions, users, and settings#278
Conversation
|
Fixes: #276 |
bf971a5 to
d6a55e4
Compare
|
@tsagadar RE #276, this is pretty much my proposed solution to that, in theory we could actually handle API path permissions too (have BFF use UI permissions and separate API permissions), but I think just being able to properly configure users is good enough. In any case, even with API permissions, the program could just use the BFF endpoints anyway. This feels like a relatively elegant solution that allows getting rid of some configuration inside the initial yaml file, let me know your thoughts. |
tsagadar
left a comment
There was a problem hiding this comment.
Few things that popped out from the code. Will do some manual testing at a later stage.
d6a55e4 to
ff117cc
Compare
|
Tried out the new functionality. Looks nice, but I had a few issues to use it. Some of them likely can be addressed in a later PR as well.
|
tsagadar
left a comment
There was a problem hiding this comment.
See #278 (comment) for open issues.
Do we want to be able to reset a user's password via the |
7896600 to
dec3b64
Compare
|
@tsagadar Fixed issue 1, 2 and 4, will do 3 alongside user password resets if you feel we want that feature, and not entirely sure whats going on with 5. |
tsagadar
left a comment
There was a problem hiding this comment.
Just a few minor things to address.
There will be a need that user can be modified (permissions and password) by "admins". But I would not add it to this PR.
This makes the permission handling more consistent between the fastAPI routes and the nav handler.
Moving user handling from an in-memory settings config to the database will allow configuring the user information dynamically.
Using stacked `Permission` objects will allow keeping track of valid permissions, and will eventually allow displaying them on a settings page.
Inverted permission values are no longer supported.
Test creating users via API, and test BFF responses.
…recting to settings Added settings as a nav route with the `show=False` parameter so that we can render it on a custom location on the navbar.
5621e8d to
b9a0cf1
Compare
This PR aims to: