Topic: [FIXED] User role without assets login error.

Hello,

When I create a user role with no access to Assets, they are unable to log in and get the message below.  If I enable assets with View:Owner and Edit:None and Delete:None they can log in just fine and just move to the inventory tab to do their actual work.

Error message:

Trying to get property of non-object
Error Type:   E_NOTICE   

Rendered Page:   Click here to view contents able to be rendered

Source File:   C:\xampp\htdocs\tracmor\includes\prepend.inc.php         Line:   103   

Line 98:                   
Line 99:                            // If they are not in the admin panel
Line 100:                            if ($intModuleId) {
Line 101:                                $objRoleModule = RoleModule::LoadByRoleIdModuleId($objUserAccount->RoleId, $intModuleId);
Line 102:                                // If they do not have access to this module
Line 103:                                if (!$objRoleModule->AccessFlag) {
Line 104:                                    QApplication::Redirect('../common/trespass.php');
Line 105:                                }
Line 106:                                // Assign the RoleModule to QApplication
Line 107:                                else {
Line 108:                                    QApplication::$objRoleModule = $objRoleModule;

Call Stack:

#0 C:\xampp\htdocs\tracmor\includes\prepend.inc.php(103): QcodoHandleError()
#1 C:\xampp\htdocs\tracmor\home\index.php(23): QApplication::Authenticate()

Re: [FIXED] User role without assets login error.

Thank you for reporting this bug.  This has been fixed in r459 and will be in the next release.

Justin Sinclair

Got Inventory? Get Tracmor.