The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Restrict access to HTML page based on custom group

2 posters

Go down

In progress Restrict access to HTML page based on custom group

Post by Simpleman April 16th 2013, 10:46 pm

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.

Code:
<script type="text/javascript">
if (!document.getElementById('logout')) window.location.pathname = "/forum";</script>

Thanks.
avatar
Simpleman
New Member

Posts : 10
Reputation : 1
Language : English

Back to top Go down

In progress Re: Restrict access to HTML page based on custom group

Post by Simpleman April 27th 2013, 11:18 pm

I'm guessing by the lack of response but high number of reads that I write a good yarn but I'm not going to get any help with the ending. Sad
avatar
Simpleman
New Member

Posts : 10
Reputation : 1
Language : English

Back to top Go down

In progress Re: Restrict access to HTML page based on custom group

Post by Sir Chivas™ January 12th 2014, 11:46 pm

Hi,

As far as I know, you can only restrict someone by using php, however, php isn't supported here at FM.

JQuery/JavaScript: would maybe do the trick, all though, someone can just disable it on the browser and simply access it.

Regards,
Sir Chivas.
Sir Chivas™
Sir Chivas™
Helper
Helper

Male Posts : 6965
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum