Restrict user access to different panels based on roles
i have 2 panels one is the default admin one and second one lets call it superadmin
i would like to restrict access to admin only for the users that is_admin returns true for example and is_superadmin for superadmin
7 Replies
i had tried but this applies to all users
So, grab the current panel in the method and base your condition on the panel.
If super_admin return true. If panel === ‘blah’ return is_admin.
think is working 😄
nah i still get forbbiden for both
do i refer to this panels by name
this works
idk if there is a better way im open to suggestions
This looks ok. But $panel is injected so it should be the current panel.
got ya thanks