Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GTHell's avatar

If I have 3 dashboard, should I have different user role or different user type

If I had 3 dashboards (Admin, front-desk, operation) with the same login screen and everything else the same (framework, share table ...etc) except they have different functionality, should I implement user role or guard for user type?

0 likes
4 replies
jlrdw's avatar

First of all, it seems they would have different roles if it's three different dashboards. And second naturally you would need different authorization which user can use which dashboard so yes you would need either Gates of policies in conjunction with dashboard usage.

I have something similar I have admin area and bookkeeping area.

GTHell's avatar

Do you use role or just setup up entirely new guarding for different users type?

jlrdw's avatar

Just remember:

RBAC is at least 3 main steps:

  • A login required
  • An authorization implementation to determine what the logged in person with role can or cannot do
  • Protection of URL and parameters, checking that the logged in users id matches the id used in a query Each application will require unique tweaks in RBAC, no two apps are exactly the same.

Query Scopes can be used to differentiate an admin from a user, and what data is shown in the query.

But of course if you want to use 3 dashboards with role only that's your choice.

1 like

Please or to participate in this conversation.