Replies: 2 comments 4 replies
-
I really like this new feature as implemented in #877. I'd like to propose simpler terms, though:
Imo the term customer manager just brings to the table two extra terms making things harder to parse. And is it currently stands, it might also be a bit of a misnomer, with the given user only having read rights (even though it is expected to have additional rights at some point in the future, while that isn't worked, it doesn't quite fit the bill for me). I'd be happy to make a PR accordingly (which would be best to do before releasing 0.17). |
Beta Was this translation helpful? Give feedback.
-
Work in #877 is merged. Closing this discussion. |
Beta Was this translation helpful? Give feedback.
-
Why
Issue #203 asked for a new authorization, which enables users in some (non-admin) accounts to access the data in some other accounts. Let's discuss our first implementation step here.
In practice, this is useful for a channel partner of ours who has existing customer relationships and would rather manage them themselves. Some use cases:
Let's work on the first. We want to give some read-permissions.
Data model
I propose that each account can have one
consultancy_account_id
field (defaults to None). If set, that account has consultancy rights.This would require a simple & backward-compatible data model migration.
Changes to auth policy
Here is how the ACL policy in a
GenericAsset
for read-access looks like now:Let's enhance it like this:
Likewise for
Sensor
.Testing
We need to add a few tests to make sure this is working.
We should also find a way to test this in practice. Browsing the FlexMeasures UI on localhost with a consultancy user made for this purpose is a good approach. One could also see if the FM client handles this well.
And at Seita, we can use a development version of this in our V2G living lab.
UI
In order to do this, we'll probably have to add this new field in the data model to the
Account
API (which for now has only GET endpoints).Editing accounts in the UI (not creating, yet) is something we should also add at a later point, and then this field would also be in that form.
Addendum: also require a user role
We could already model that only certain roles in the consultancy account have these special rights. They might add users to their account without wanting them to have such powers.
Let's call that role "customer-manager" for now.
Left out
To be sure, there are some ideas not touched upon here:
Beta Was this translation helpful? Give feedback.
All reactions