Setting up a limited user [message #1871] |
Sun, 23 November 2008 11:34 |
David Lee
Messages: 44 Registered: June 2006
|
Member |
|
|
Hi
I have set up a role JC_KEY_LOOKUP with a start menu of building, and without global access, but with specific access to both the main menu and the building menu. However, I can not log in with such settings, but get the following error report:
Fatal Error: menu - Access to task 'menu' has not been allowed. (# 256).
Error in line 1513 of file '/home/radicore/includes/include.session.inc'.
Script: /radicore/menu/logon.php
User Id: JCUSER
Remote Address: 192.168.0.187
Request URI: /radicore/menu/logon.php
Page Stack:
0: array =
function: string = errorHandler
args: array =
0: integer = 256
1: string = menu - Access to task 'menu' has not been allowed.
2: string = /home/radicore/includes/include.session.inc
3: integer = 1513
4: array =
task_id: string = menu
where: string =
selection: string =
task_array: string = null
current_menu: string = null
current_task: string = null
menu_buttons: array =
messages: array =
page_stack: array =
script_vars: array =
script_count: integer = 1
PHP_SELF: string = /menu/logon.php
curr_task: string = logon
page_data: array =
task_id: string = logon
task_array: array =
logon: boolean = 1
logon: array =
script_count: integer = 1
pattern_id: string = logon
page: string = /menu/logon.php
test_task_id: string = logon
query_string: string = selection=building
settings_bf: string = null
errors: array =
0: string = Access to task 'menu' has not been allowed.
1: array =
file: string = /home/radicore/includes/include.session.inc
line: integer = 1513
function: string = trigger_error
args: array =
0: string = menu - Access to task 'menu' has not been allowed.
1: integer = 256
2: array =
file: string = /var/www/radicore/menu/logon.php
line: integer = 149
function: string = scriptNext
args: array =
0: string = menu
1: string = null
2: string = null
3: array =
query_string: string = selection=building
Stepping through the code, it appears that the following lines from mnu_task.class.inc return access_allowed as N
$this->sql_select = 'mnu_task.task_id, task_desc, button_text, task_type, pattern_id, script_id, subsys_dir, initial_passthru, selection_fixed, selection_temp, settings, order_by, is_disabled, global_access, keep_data, log_sql_query, screen_refresh, use_https, max_execution_time'
.", CASE WHEN mnu_role_task.role_id IS NOT NULL THEN 'Y' ELSE 'N' END AS access_allowed";
$this->sql_from = 'mnu_task '
. 'LEFT JOIN mnu_subsystem ON (mnu_subsystem.subsys_id=mnu_task.subsys_id) '
. "LEFT JOIN mnu_role_task ON (mnu_role_task.task_id=mnu_task.task_id AND mnu_role_task.role_id='$role_id') "
. "LEFT JOIN mnu_role ON (mnu_role.role_id='$role_id')";
$this->sql_where = '';
$this->errors = array();
$fieldarray = $this->getData_raw("mnu_task.task_id='" .addslashes($task_id) ."'");
Does this indicate I have set something up incorrectly?
Why, when the start task is building, is it checking and going to the menu task?
|
|
|
|
|
Re: Setting up a limited user [message #1886 is a reply to message #1885] |
Mon, 24 November 2008 19:31 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
MENU01 and MAIN_MENU are the identities of different lists of items (there can be many others), while the MENU task is what is used to display a list of items. It may sound confusing to begin with, but once you see the error message "Access to task 'menu' has not been allowed" it is easy to fix - simply add task "menu" to the access list for each role and off you go.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|