Index: trunk/core/units/config_search/config_search_event_handler.php =================================================================== diff -u -N -r1566 -r1821 --- trunk/core/units/config_search/config_search_event_handler.php (.../config_search_event_handler.php) (revision 1566) +++ trunk/core/units/config_search/config_search_event_handler.php (.../config_search_event_handler.php) (revision 1821) @@ -31,7 +31,9 @@ function OnUpdate(&$event) { - parent::OnUpdate($event); + if (!$this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 0)) { + parent::OnUpdate($event); + } $module_owner=$this->Application->GetVar('module'); $module_section=$this->Application->GetVar('section'); Index: trunk/kernel/units/configuration/configuration_event_handler.php =================================================================== diff -u -N -r1566 -r1821 --- trunk/kernel/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 1566) +++ trunk/kernel/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 1821) @@ -100,7 +100,9 @@ function OnUpdate(&$event) { - parent::OnUpdate($event); + if (!$this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 0)) { + parent::OnUpdate($event); + } $module_owner=$this->Application->GetVar('module'); $section=$this->Application->GetVar('section'); Index: trunk/core/units/configuration/configuration_event_handler.php =================================================================== diff -u -N -r1566 -r1821 --- trunk/core/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 1566) +++ trunk/core/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 1821) @@ -100,7 +100,9 @@ function OnUpdate(&$event) { - parent::OnUpdate($event); + if (!$this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 0)) { + parent::OnUpdate($event); + } $module_owner=$this->Application->GetVar('module'); $section=$this->Application->GetVar('section'); Index: trunk/core/kernel/application.php =================================================================== diff -u -N -r1763 -r1821 --- trunk/core/kernel/application.php (.../application.php) (revision 1763) +++ trunk/core/kernel/application.php (.../application.php) (revision 1821) @@ -148,7 +148,10 @@ if( !$this->RecallVar('UserGroups') ) { - $this->StoreVar('UserGroups', $this->ConfigValue('User_GuestGroup')); + $ses =& $this->recallObject('Session'); + $user_groups = trim($ses->GetField('GroupList'), ','); + if (!$user_groups) $user_groups = $this->ConfigValue('User_GuestGroup'); + $this->StoreVar('UserGroups', $user_groups); } if( !$this->RecallVar('curr_iso') ) $this->StoreVar('curr_iso', $this->GetPrimaryCurrency() ); Index: trunk/core/units/general/inp_db_event_handler.php =================================================================== diff -u -N -r1566 -r1821 --- trunk/core/units/general/inp_db_event_handler.php (.../inp_db_event_handler.php) (revision 1566) +++ trunk/core/units/general/inp_db_event_handler.php (.../inp_db_event_handler.php) (revision 1821) @@ -23,6 +23,10 @@ */ function iterateItems(&$event) { + if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 0)) { + return; + } + $this->Application->setUnitOption($event->Prefix,'AutoLoad',false); $object =& $event->getObject(); $this->StoreSelectedIDs($event); @@ -77,6 +81,10 @@ */ function OnMassClone(&$event) { + if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 0)) { + return; + } + $event->status=erSUCCESS; $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); Index: trunk/kernel/units/general/inp_db_event_handler.php =================================================================== diff -u -N -r1566 -r1821 --- trunk/kernel/units/general/inp_db_event_handler.php (.../inp_db_event_handler.php) (revision 1566) +++ trunk/kernel/units/general/inp_db_event_handler.php (.../inp_db_event_handler.php) (revision 1821) @@ -23,6 +23,10 @@ */ function iterateItems(&$event) { + if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 0)) { + return; + } + $this->Application->setUnitOption($event->Prefix,'AutoLoad',false); $object =& $event->getObject(); $this->StoreSelectedIDs($event); @@ -77,6 +81,10 @@ */ function OnMassClone(&$event) { + if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 0)) { + return; + } + $event->status=erSUCCESS; $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); Index: trunk/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r1801 -r1821 --- trunk/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 1801) +++ trunk/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 1821) @@ -799,6 +799,10 @@ */ function OnMassDelete(&$event) { + if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 0)) { + return; + } + $event->status=erSUCCESS; $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); @@ -853,7 +857,9 @@ $skip_master = true; //we've already copied master table to get the id }*/ - $temp->SaveEdit($skip_master); + if (!$this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 0)) { + $temp->SaveEdit($skip_master); + } $this->clearSelectedIDs($event); $event->redirect_params = Array('opener'=>'u'); Index: trunk/kernel/units/config_search/config_search_event_handler.php =================================================================== diff -u -N -r1566 -r1821 --- trunk/kernel/units/config_search/config_search_event_handler.php (.../config_search_event_handler.php) (revision 1566) +++ trunk/kernel/units/config_search/config_search_event_handler.php (.../config_search_event_handler.php) (revision 1821) @@ -31,7 +31,9 @@ function OnUpdate(&$event) { - parent::OnUpdate($event); + if (!$this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 0)) { + parent::OnUpdate($event); + } $module_owner=$this->Application->GetVar('module'); $module_section=$this->Application->GetVar('section');