# Panel area only for admins

**URL:** <https://forum.getkirby.com/t/panel-area-only-for-admins/32707>\
**Category:** Questions\
**Created:** [October 20, 2024, 8:02pm UTC](https://forum.getkirby.com/t/panel-area-only-for-admins/32707 "2024-10-20T20:02:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarneuyt](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jarneuyt/32/9504_2.png) [@jarneuyt](https://forum.getkirby.com/u/jarneuyt)\
**Post date:** [October 20, 2024, 8:02pm UTC](https://forum.getkirby.com/t/panel-area-only-for-admins/32707/1 "2024-10-20T20:02:17Z")

</div>

Hi there,

Can I make a custom panel area (“dashboard”) only visible for accounts with the admin role? The other roles (Editor, Viewer, …) should not have access to the dashboard. Preferably I would just hide the sidebar menu item “Dashboard”.

Is this possible?

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/2/24f8dc6923d5df3afab4938bfe3fd0f666ca1d81.png)

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [October 20, 2024, 9:32pm UTC](https://forum.getkirby.com/t/panel-area-only-for-admins/32707/2 "2024-10-20T21:32:33Z")

</div>

Have you tried access permissions in the user role blueprints for non-admins?

> **[Permissions](https://getkirby.com/docs/guide/users/permissions#role-based-permissions-in-user-blueprints)**
>
> User permissions help you to restrict access and capabilities for specific user roles – in the Panel as well as when using Kirby's PHP API or REST API.

If that doesn’t work, you could hide the menu item based on role in your custom area und do a redirect in the route action to prevent direct access to the path for non-admin roles

---

<div class="post-metadata">

**Author:** ![jarneuyt](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jarneuyt/32/9504_2.png) [@jarneuyt](https://forum.getkirby.com/u/jarneuyt)\
**Post date:** [October 24, 2024, 6:33am UTC](https://forum.getkirby.com/t/panel-area-only-for-admins/32707/3 "2024-10-24T06:33:35Z")

</div>

How do you hide a menu item based on your role?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [October 24, 2024, 10:36am UTC](https://forum.getkirby.com/t/panel-area-only-for-admins/32707/4 "2024-10-24T10:36:56Z")

</div>

Have you tried the permission access option I linked to? Should work.

---

<div class="post-metadata">

**Author:** ![leobard](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/leobard/32/15868_2.png) [@leobard](https://forum.getkirby.com/u/leobard)\
**Post date:** [March 9, 2025, 2:10pm UTC](https://forum.getkirby.com/t/panel-area-only-for-admins/32707/5 "2025-03-09T14:10:49Z")

</div>

I have the same question for my plugin [GitHub - leobard/deploy-yourself: A script to update a kirby website code (not content) by pulling from git.](https://github.com/leobard/deploy-yourself)

I would also like to “hide the menu item based on role in your custom area”.

And I hoped it would be

```auto
Kirby::plugin('leobard/deploy-yourself', [
'areas' => function () => {
  if(kirby()->user()?->role() == 'admin') return [
     ...area goes here
  ]
]);

```

I found [Permissions | Kirby CMS](https://getkirby.com/docs/guide/users/permissions) not immediately intuitive to use, as I would have to remove `access` to the area of my plugin for all multiple non-admin roles.
