ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


You do not have permission to access this area


  • 2008-01-25 11:15:58

    You do not have permission to access this area

    Hi,
    I created an admin (not a super admin) and all is ok except it has a system preferences tab unnecessarily. When one clicks on it (or the System Preferences text link on this new admin's start page) one gets the message:
    "The following errors occurred:
    You do not have permission to access this area."

    Is it possible to somehow remove the tab and the links from within this new admin? If not from with the main admin, maybe by some simple editing of the php files

  • 2008-01-25 11:34:40

    Re: You do not have permission to access this area

    You could probably "hack" the tab out. Something like

    if: not system tools permissions:
    then: don't show system prefs tab

    in

    /include/lib/menu_pages.php

  • 2008-01-25 12:32:05

    Re: You do not have permission to access this area

    With apologies, what would the relevant lines look like.
    For example,
    [b]to check whether admin:[/b]
    if (admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE))

    [b]to display the tab:[/b]
    $_pages[AT_NAV_START] = array_merge(array('users/index.php', 'users/profile.php', 'users/preferences.php'), (array) $_pages[AT_NAV_START]);
    OR
    $_pages['admin/config_edit.php']['guide'] = 'admin/?p=system_preferences.php';

    OR
    $_pages['users/preferences.php']['title_var'] = 'preferences';
    OR
    $_pages['users/preferences.php']['parent'] = AT_NAV_START;
    OR
    $_pages['users/preferences.php']['guide'] = 'general/?p=preferences.php';


    Things to describe:
    operating system -linux
    version of ATutor -1.5.5
    versions of php -4+
    version of mysq l -4+
    [b] [/b]

  • 2008-01-25 12:53:30

    Re: You do not have permission to access this area

    Probably the lines below.

    Don't be afraid to experiment, or explore. Read the developer doc for details. Make use of the debug() function it describes, etc.


    [php]

    $_pages['admin/config_edit.php']['title_var'] = 'system_preferences';
    $_pages['admin/config_edit.php']['parent'] = AT_NAV_ADMIN;
    $_pages['admin/config_edit.php']['guide'] = 'admin/?p=system_preferences.php';
    $_pages['admin/config_edit.php']['children'] = array_merge((array) $_pages['admin/config_edit.php']['children'], array('admin/error_logging.php'));

    [/php]

  • 2008-01-25 15:21:24

    Re: You do not have permission to access this area

    thanks, greg! Did it!
    used if (admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) at the head instead of if (admin_authenticate(AT_ADMIN_PRIV_USERS, AT_PRIV_RETURN)) which apparently checks for all admins

    I asked another question elsewhere which I haven't been able to figure out yet: do links to tests appear in the Content Navigation menu as well? or do they just appear on the My Courses page.