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
[UI] Add configurability to the menu, what root view to show and what name to use #163
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments.
I just noticed that there is another setting (FLEXMEASURES_PLATFORM_NAME) which we might want to treat much the same as the two settings I already worked on |
We also still need CLI command for adding a new account role. Deleting a role can be tricky if accounts are connected to it. |
…ion (#164) This gives more flexibility in naming the plugin, and less worrying about consistently naming plugins and blueprints in different places (thereby facilitating renaming plugins). The possibility of defining multiple Blueprints in a plugin is more of a perk, but I can imagine it comes in handy if you want to register separate Blueprints for your UI and API, for example, with a different url_prefix.
…nto views-by-accounts
… and use it throughout
* Allow to set view icons and titles as a config setting * Add config defaults * Allow Font Awesome icons to be used in the documentation * Add documentation for the two new config settings Co-authored-by: Nicolas Höning <iam@nicolashoening.de>
…verything, not just to menu entries not in the original list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted 164 so this can be tackled in a separate PR to main.
Just 1 more comment (to fix a docstring or the delete_account_role
function's logic, according to whatever you had in mind), otherwise this PR has my approval.
Let the root view ('/') and menu be configurable by which account role(s) the current user's account has.
Let menu titles and icons be configurable.
This gives more control for supporting different kinds of services on one server. We introduce account roles for this, so that accounts can be treated differently.
To test this, one could play with the relevant config variables:
But first, a database upgrade:
Also, you can assign account roles to your user, e.g.
Alternatively, making a fresh account now can create account roles alongside: