How to do it...

Follow given steps to hide elements based in security groups:

  1. Add a groups attribute on <header> to hide it from other users:
...
<header groups="my_library.group_library_user">
...
  1. Add the groups attribute on the <menuitem> book category to display it only for librarian users:
    <menuitem name="Book Categories"
id="library_book_category_menu"
parent="library_base_menu"
action="library_book_category_action"
groups="my_library.group_library_librarian"/>

Restart the server and update the module to apply the changes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset