Hi I've got a custom HTML page that can be accessed via the menu. I can restrict access to those menu items via the control panel but it doesn't allow me to restrict access to a custom group. So I was wondering whether there's any JavaScript code that redirect the user to the main forum if they don't belong to a specific group.
Ideally I wouldn't want the menu item available if the user isn't part of this specific group. However if this not achievable I'd like it to work like the code below, but instead of checking if the user is logged in, check if they belong to a specific user group.
Thanks.
Ideally I wouldn't want the menu item available if the user isn't part of this specific group. However if this not achievable I'd like it to work like the code below, but instead of checking if the user is logged in, check if they belong to a specific user group.
- Code:
<script type="text/javascript">
if (!document.getElementById('logout')) window.location.pathname = "/forum";</script>
Thanks.