Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 08:29:35 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155535 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Deny backend access (2)  (Read 310 times)
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« on: April 20, 2010, 06:57:19 PM »

Hi,

I am working (again) on a small core modification to deny backend access for certain groups.

Why is this usefull?
For example, you want to allow some users interaction in frontend - like give them access to some restricted content..etc, but deny them to see backend theme (only to see, not to mess with priviledges..)

So, as I saw that $_Session[GROUP_ID] will be removed soon in 2.9, the other way to check for users group would be:
Code:
$groups_id = $admin->get_groups_id();
if(in_array('2', $groups_id)) {
die(header('Location: ../../index.php'));
}

Now, If I put this code below:
Code:
require('../../config.php');
require_once(WB_PATH.'/framework/class.admin.php');
$admin = new admin('Start','start');

$groups_id = $admin->get_groups_id();
if(in_array('2', $groups_id)) {
die(header('Location: ../../index.php'));
}

I do not get redirected  Sad , the backend is visible (header and menu only)..

I was checking this with session variable before, and header redirection worked fine, any tips how can I solve this ?

cheers
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #1 on: May 05, 2010, 01:54:00 PM »

I am still working on this.. could anyone give me some tip how to solve this ?
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!