Permissions

The ng-matero uses ngx-permissions to manage permissions. Please check the docs for more details.

The ngx-permissions directive is already built into the ng-matero's menu. You can add the permissions field directly from the menu's configuration.

{
  "menu": [
    ...
    {
      "route": "design",
      "name": "design",
      "type": "sub",
      "icon": "color_lens",
+     "permissions": {
+       "only": [
+         "ADMIN",
+         "MANAGER"
+       ]
+     }
    },
    ...
  ]
}

https://ng-matero.github.io/ng-matero/permissions/role-switching

Last updated