Project

General

Profile

« Previous | Next » 

Revision 1796

Added by Dietmar almost 12 years ago

! supress frontend preferences, if user have no permission for it

View differences:

preferences.php
27 27
require_once(WB_PATH.'/framework/functions.php');
28 28

  
29 29
$wb = new frontend(false);
30
$permission = new admin('##skip##');
30 31

  
31 32
if(!FRONTEND_LOGIN) {
32 33
	$wb->send_header('Location: '.WB_URL.'/');
......
37 38
	$wb->send_header('Location: '.WB_URL.'/account/login.php');
38 39
	exit(0);
39 40
}
41

  
42
if ($permission->get_permission('preferences')==false) {
43
	$wb->send_header('Location: '.WB_URL.'/');
44
	exit(0);
45
}
46

  
40 47
$page_id = defined('REFERRER_ID') ? REFERRER_ID : isset($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
41 48

  
42 49
// Required page details

Also available in: Unified diff