Commit Graph

5 Commits

Author SHA1 Message Date
taitus
a5911f5c6a Modify admin layout to only manage tenants and admins
We only want to render the account link and login items in the header.
And we want only render the Multitenancy and Administrators sections in
the admin sidebar.

We include the administrators management so it's possible to give
permissions to other users to manage tenants.

In order to restrict access to other sections by typing the URL or
following a link, we're only enabling the rest of the routes when we
aren't in the multitenancy management mode.
2024-11-06 11:17:53 +01:00
Javi Martín
1d955b7a20 Simplify using helper methods in components
The `use_helpers` method was added in ViewComponent 3.8.0, and it's
included by default in all components since version 3.11.0.

Note we sometimes delegated the `can?` method to the controller instead
of the helpers, for no particularly reason. We're unifying that code as
well.
2024-03-02 17:34:25 +01:00
Javi Martín
e000bd9a61 Hide menu button to managers on small screens
This menu isn't rendered in this case, so the "menu" button to toggle it
did nothing.
2023-01-16 14:44:01 +01:00
Javi Martín
ca28a31ee5 Extract method in admin header component 2023-01-16 14:22:23 +01:00
Javi Martín
86fd14f8f0 Move admin header partial to a component
This way it's easier to refactor it.

Note we're using `with_request_url` in the tests because the component
renders the locale switcher, which needs a URL in order to work. This
doesn't affect whether we're in the management section or not.
2023-01-16 14:22:13 +01:00