Replies: 1 comment 2 replies
-
I like it. It might then make sense to have a db migration to grandfather existing consultancy accounts (those mentioned by other accounts as being ther consultancy) to get the new role.
I share your preference for only supported roles, extendable by plugins.
This indeed needs further consideration. For instance, we could limit write permission to only users within the MDC account with some dedicated user role (e.g. meter-data-publisher or just publisher). So then similar to how we give only consultants within consultancies read permission on time series data and write permission on structural data, we'd give only publishers within MDCs write permission on time series data and (?) read permission on structural data. One limitation of this role-based approach is that it doesn't support fine-grained access rights. For instance, a publisher could write on any sensor in their client's account. That seems like too strong of a permission if you ask me. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
During our work on #2176 (users creating accounts in the UI), we saw the need to discuss account roles - something we mention in the docs and support in authorization, but we do not yet support specific account roles, as we do for user roles.
I am documenting these thoughts here mainly for documentation. Thoughts are also welcome.
So, about users creating accounts in the UI / API: Obviously, site-admins can do that.
But for others, how should we authorize?
The "Consultancy" role
So the site admins would be in control to decide who gets to create clients - by assigning this role to accounts. (alternatively, it could be a boolean attribute on the account - but a role does play better in our authorization framework). As later steps, we can add limits to the number of clients in the account settings, next to other limits we'll need later, like number of daily schedules.
Or should everybody be able to create clients? I don't think so.
Actually, if the Consultancy account role would exist, it could have two use cases:
Other roles? "MDC" (Meter Data company)
I then thought about other account roles we might want to support. I came to our recent refactoring so that data sources will be account-bound.
Is it useful to support the MDC role (meter data company), thereby enabling dedicated accounts to also add data to accounts where the user's accounts is neither equal to the account of the sensor, nor its consultancy?
Proposed actions
A PR which improves/introduces account-role handling (with the Consultancy role)
A PR for supporting MDC account role officially
account.meter_data_company_id)Beta Was this translation helpful? Give feedback.
All reactions