Allow anonymous users to use the toolbar core module [on hold]

13/08/2018


One of my Drupal 8 websites is targeting mostly mobile users (Small width Screens) rather than desktop users (Wide witdh screens), and for that the menus available for the website (Main Navigation
& User account menu) both should be mobile ready.

The Drupal 8 core come shipped with the Toolbar module which is well responsive and 100% mobile ready.

The module help page says:

The Toolbar module provides a toolbar for site administrators,
which displays tabs and trays provided by the Toolbar module itself
and other modules.

Tabs

Tabs are buttons, displayed in a bar across the top of the screen.
Some tabs execute an action (such as starting Edit mode), while other
tabs toggle which tray is open.

Trays

Trays are usually lists of links, which can be hierarchical like a
menu. If a tray has been toggled open, it is displayed either
vertically or horizontally below the tab bar, depending on the browser
width. Only one tray may be open at a time. If you click another tab,
that tray will replace the tray being displayed.

In wide browser widths, the user has the ability to toggle from
vertical to horizontal, using a link at the bottom or right of the
tray. Hierarchical menus only have open/close behavior in vertical
mode; if you display a tray containing a hierarchical menu
horizontally, only the top-level links will be available.

Instead of installing another module for a mobile first responsive menu, i was thinking maybe i will give all roles on the website the permission to Use the administration toolbar and so all roles including anonymous users will be able to use the administration toolbar, but every role will see different links listed on the toolbar depends on their other permissions such as:

  • Article: Create new content

  • Basic page: Create new content

  • View user information

  • Access tours.

  • Administer modules

  • Access the taxonomy vocabulary overview page

  • Administer views

Has somebody else did what I am trying to do?
Is it a good idea to proceed with, or will it have security implications?

قالب وردپرس