Recently installed Admin Profiles module on a 1.3.9h zen cart shopping cart. Upon installation I follow this set of instuctions to manage user permission:
- Log in to admin (if it is your first time in, you will need to be the user with admin_id = 1).
- Go to
Admin > Tools > Admin Settings - Click on Permissions icon (white p in an orange circle) for the user whose permissions you want to edit. There are two levels of control, menu headers (e.g. configuration, catalog, modules, and individual pages).
On step 3, I kept getting this error message – “Sorry, your security clearance does not allow you to access this resource“. After several internet search a link (http://www.zen-cart.com/wiki/index.php/Contribution:Admin_Profiles).
To fix this problem, open init_admin_auth.php located in admin folder ”admin folder name” >> includes >> init_includes >>overrides. Look for this body of code and change body of code from
if (!(basename($PHP_SELF) == FILENAME_LOGIN . ".php"))
{
$page = basename($PHP_SELF, ".php");
if (!in_array($page, array(FILENAME_DEFAULT,FILENAME_PRODUCT,FILENAME_LOGOFF,FILENAME_ALT_NAV,FILENAME_PASSWORD_FORGOTTEN,FILENAME_DENIED)))
{
if (check_page($page) == FALSE)
{
header("location: ".FILENAME_DENIED.".php");
}
}
if (!isset($_SESSION['admin_id']))
{
if (!(basename($PHP_SELF) == FILENAME_PASSWORD_FORGOTTEN . '.php'))
{
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
}
}
to this code of code.
if (!(basename($PHP_SELF) == FILENAME_LOGIN . ".php"))
{
$page = basename($PHP_SELF, ".php");
if (!in_array($page, array(FILENAME_DEFAULT,FILENAME_PRODUCT,FILENAME_LOGOFF,FILENAME_ALT_NAV,FILENAME_PASSWORD_FORGOTTEN,FILENAME_DENIED,FILENAME_ADMIN_CONTROL)))
{
if (check_page($page) == FALSE)
{
header("location: ".FILENAME_DENIED.".php");
}
}
if (!isset($_SESSION['admin_id']))
{
if (!(basename($PHP_SELF) == FILENAME_PASSWORD_FORGOTTEN . '.php'))
{
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
}
}
The basic difference between the two bodies of code is in the array definition within the in_array function. It was changed from
in_array($page, array(FILENAME_DEFAULT,FILENAME_PRODUCT,FILENAME_LOGOFF,FILENAME_ALT_NAV,FILENAME_PASSWORD_FORGOTTEN,FILENAME_DENIED)))
to
in_array($page, array(FILENAME_DEFAULT,FILENAME_PRODUCT,FILENAME_LOGOFF,FILENAME_ALT_NAV,FILENAME_PASSWORD_FORGOTTEN,FILENAME_DENIED,FILENAME_ADMIN_CONTROL)))


Recent Comments