Index: trunk/kernel/units/categories/categories_event_handler.php =================================================================== diff -u -N -r5177 -r5194 --- trunk/kernel/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 5177) +++ trunk/kernel/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 5194) @@ -65,17 +65,21 @@ $object->addFilter('parent_filter', 'ParentId = '.$parent_cat_id); $object->addFilter('perm_filter', 'PermId = 1'); // check for CATEGORY.VIEW permission - if ($this->Application->GetVar('u_id') > 0) { // !$this->Application->IsAdmin() || + if ($this->Application->GetVar('u_id') > 0) { // apply permission filters to all users except "root" $groups = explode(',',$this->Application->RecallVar('UserGroups')); foreach ($groups as $group) { $view_filters[] = 'FIND_IN_SET('.$group.', acl) || ((NOT FIND_IN_SET('.$group.',dacl)) AND acl=\'\')'; } $view_filter = implode(' OR ', $view_filters); $object->addFilter('perm_filter2', $view_filter); - $object->addFilter('status_filter', $object->TableName.'.Status = 1'); } + if (!$this->Application->IsAdmin()) { + // apply status filter only on front + $object->addFilter('status_filter', $object->TableName.'.Status = 1'); + } + if(strpos($types, 'category_related') !== false) { $object->removeFilter('parent_filter'); Index: trunk/core/admin_templates/js/catalog.js =================================================================== diff -u -N -r5137 -r5194 --- trunk/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5137) +++ trunk/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5194) @@ -157,7 +157,7 @@ this.ShowDependentButtons(this.ActivePrefix); this.setViewMenu(this.ActivePrefix); setCookie(this.CookiePrefix + 'active_prefix', this.ActivePrefix); - + // this.TabRegistry.length == 1 var $cat_id = get_hidden_field('m_cat_id'); var $tab_cat_id = document.getElementById($div_id).getAttribute('category_id'); @@ -168,7 +168,6 @@ this.BusyRequest[$prefix] = false; Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this); -// $Debugger.ShowProps(this.BusyRequest); } /*else { alert('refresh disabled = {tab: '+this.ActivePrefix+'; cat_id: '+$cat_id+'}'); @@ -236,5 +235,5 @@ } Catalog.prototype.setViewMenu = function($item_prefix) { - $ViewMenus = new Array('c', $item_prefix); + $ViewMenus = isset($item_prefix) ? new Array('c', $item_prefix) : new Array('c'); } \ No newline at end of file Index: trunk/core/units/categories/categories_event_handler.php =================================================================== diff -u -N -r5177 -r5194 --- trunk/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 5177) +++ trunk/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 5194) @@ -65,17 +65,21 @@ $object->addFilter('parent_filter', 'ParentId = '.$parent_cat_id); $object->addFilter('perm_filter', 'PermId = 1'); // check for CATEGORY.VIEW permission - if ($this->Application->GetVar('u_id') > 0) { // !$this->Application->IsAdmin() || + if ($this->Application->GetVar('u_id') > 0) { // apply permission filters to all users except "root" $groups = explode(',',$this->Application->RecallVar('UserGroups')); foreach ($groups as $group) { $view_filters[] = 'FIND_IN_SET('.$group.', acl) || ((NOT FIND_IN_SET('.$group.',dacl)) AND acl=\'\')'; } $view_filter = implode(' OR ', $view_filters); $object->addFilter('perm_filter2', $view_filter); - $object->addFilter('status_filter', $object->TableName.'.Status = 1'); } + if (!$this->Application->IsAdmin()) { + // apply status filter only on front + $object->addFilter('status_filter', $object->TableName.'.Status = 1'); + } + if(strpos($types, 'category_related') !== false) { $object->removeFilter('parent_filter'); Index: trunk/kernel/units/users/users_event_handler.php =================================================================== diff -u -N -r4880 -r5194 --- trunk/kernel/units/users/users_event_handler.php (.../users_event_handler.php) (revision 4880) +++ trunk/kernel/units/users/users_event_handler.php (.../users_event_handler.php) (revision 5194) @@ -156,7 +156,7 @@ if ($object->GetDBField('Status') == STATUS_ACTIVE) { $groups = $object->getMembershipGroups(true); if(!$groups) $groups = Array(); - if ( !$this->Application->IsAdmin() ) array_push($groups, $this->Application->ConfigValue('User_LoggedInGroup') ); + array_push($groups, $this->Application->ConfigValue('User_LoggedInGroup') ); $this->Application->StoreVar( 'UserGroups', implode(',', $groups) ); if ($this->checkLoginPermission($login_value)) { Index: trunk/kernel/admin_templates/incs/catalog.js =================================================================== diff -u -N -r5137 -r5194 --- trunk/kernel/admin_templates/incs/catalog.js (.../catalog.js) (revision 5137) +++ trunk/kernel/admin_templates/incs/catalog.js (.../catalog.js) (revision 5194) @@ -157,7 +157,7 @@ this.ShowDependentButtons(this.ActivePrefix); this.setViewMenu(this.ActivePrefix); setCookie(this.CookiePrefix + 'active_prefix', this.ActivePrefix); - + // this.TabRegistry.length == 1 var $cat_id = get_hidden_field('m_cat_id'); var $tab_cat_id = document.getElementById($div_id).getAttribute('category_id'); @@ -168,7 +168,6 @@ this.BusyRequest[$prefix] = false; Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this); -// $Debugger.ShowProps(this.BusyRequest); } /*else { alert('refresh disabled = {tab: '+this.ActivePrefix+'; cat_id: '+$cat_id+'}'); @@ -236,5 +235,5 @@ } Catalog.prototype.setViewMenu = function($item_prefix) { - $ViewMenus = new Array('c', $item_prefix); + $ViewMenus = isset($item_prefix) ? new Array('c', $item_prefix) : new Array('c'); } \ No newline at end of file Index: trunk/core/units/users/users_event_handler.php =================================================================== diff -u -N -r4880 -r5194 --- trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 4880) +++ trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 5194) @@ -156,7 +156,7 @@ if ($object->GetDBField('Status') == STATUS_ACTIVE) { $groups = $object->getMembershipGroups(true); if(!$groups) $groups = Array(); - if ( !$this->Application->IsAdmin() ) array_push($groups, $this->Application->ConfigValue('User_LoggedInGroup') ); + array_push($groups, $this->Application->ConfigValue('User_LoggedInGroup') ); $this->Application->StoreVar( 'UserGroups', implode(',', $groups) ); if ($this->checkLoginPermission($login_value)) {