Skip to content

Commit

Permalink
Ticket #4763
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyUna committed Aug 8, 2024
1 parent ab53c39 commit 85d547b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/base/groups/classes/BxBaseModGroupsPageEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,14 @@ protected function _isVisiblePage ($a)
$bPartiallyVisible = false;
if(!empty($CNF['OBJECT_PRIVACY_VIEW']) && ($oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) !== false)
$bPartiallyVisible = $oPrivacy->isPartiallyVisible($this->_aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]);

/*
* If partially visible, replace current page with different set of blocks.
*/
if($bPartiallyVisible && $this->_sObject == $CNF['OBJECT_PAGE_VIEW_ENTRY']) {
$aObject = BxDolPageQuery::getPageObject($CNF['OBJECT_PAGE_VIEW_ENTRY_CLOSED']);

$bJoinPage = isset($CNF['OBJECT_PAGE_JOINED_ENTRY']) && $this->_sObject === $CNF['OBJECT_PAGE_JOINED_ENTRY'];
if($bPartiallyVisible && ($this->_sObject === $CNF['OBJECT_PAGE_VIEW_ENTRY'] || $bJoinPage)) {
$sPage = $bJoinPage ? $CNF['OBJECT_PAGE_JOINED_ENTRY'] : $CNF['OBJECT_PAGE_VIEW_ENTRY_CLOSED'];
$aObject = BxDolPageQuery::getPageObject($sPage);
$this->_sObject = $aObject['object'];
$this->_aObject = $aObject;
$this->_oQuery = new BxDolPageQuery($this->_aObject);
Expand Down
1 change: 1 addition & 0 deletions modules/boonex/channels/classes/BxCnlConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function __construct($aModule)
'OBJECT_MENU_MANAGE_TOOLS' => 'bx_channels_menu_manage_tools', //manage menu in content administration tools
'OBJECT_PAGE_VIEW_ENTRY' => 'bx_channels_view_profile',
'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_channels_view_profile_closed',
'OBJECT_PAGE_JOINED_ENTRY' => 'bx_channels_join_profile',
'OBJECT_PRIVACY_VIEW' => 'bx_channels_allow_view_to',
'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_channels_allow_view_notification_to',
'OBJECT_GRID_ADMINISTRATION' => 'bx_channels_administration',
Expand Down
1 change: 1 addition & 0 deletions modules/boonex/courses/classes/BxCoursesConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ function __construct($aModule)
'OBJECT_MENU_MANAGE_TOOLS' => 'bx_courses_menu_manage_tools', //manage menu in content administration tools
'OBJECT_PAGE_VIEW_ENTRY' => 'bx_courses_view_profile',
'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_courses_view_profile_closed',
'OBJECT_PAGE_JOINED_ENTRY' => 'bx_courses_join_profile',
'OBJECT_PRIVACY_VIEW' => 'bx_courses_allow_view_to',
'OBJECT_PRIVACY_LIST_VIEW' => 'bx_courses_allow_view_favorite_list',
'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_courses_allow_view_notification_to',
Expand Down
1 change: 1 addition & 0 deletions modules/boonex/events/classes/BxEventsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ function __construct($aModule)
'OBJECT_MENU_MANAGE_TOOLS' => 'bx_events_menu_manage_tools', //manage menu in content administration tools
'OBJECT_PAGE_VIEW_ENTRY' => 'bx_events_view_profile',
'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_events_view_profile_closed',
'OBJECT_PAGE_JOINED_ENTRY' => 'bx_events_join_profile',
'OBJECT_PRIVACY_VIEW' => 'bx_events_allow_view_to',
'OBJECT_PRIVACY_LIST_VIEW' => 'bx_events_allow_view_favorite_list',
'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_events_allow_view_notification_to',
Expand Down
1 change: 1 addition & 0 deletions modules/boonex/groups/classes/BxGroupsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ function __construct($aModule)
'OBJECT_MENU_MANAGE_TOOLS' => 'bx_groups_menu_manage_tools', //manage menu in content administration tools
'OBJECT_PAGE_VIEW_ENTRY' => 'bx_groups_view_profile',
'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_groups_view_profile_closed',
'OBJECT_PAGE_JOINED_ENTRY' => 'bx_groups_join_profile',
'OBJECT_PRIVACY_VIEW' => 'bx_groups_allow_view_to',
'OBJECT_PRIVACY_LIST_VIEW' => 'bx_groups_allow_view_favorite_list',
'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_groups_allow_view_notification_to',
Expand Down
1 change: 1 addition & 0 deletions modules/boonex/jobs/classes/BxJobsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ function __construct($aModule)
'OBJECT_MENU_MANAGE_TOOLS' => 'bx_jobs_menu_manage_tools', //manage menu in content administration tools
'OBJECT_PAGE_VIEW_ENTRY' => 'bx_jobs_view_profile',
'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_jobs_view_profile_closed',
'OBJECT_PAGE_JOINED_ENTRY' => 'bx_jobs_join_profile',
'OBJECT_PRIVACY_VIEW' => 'bx_jobs_allow_view_to',
'OBJECT_PRIVACY_LIST_VIEW' => 'bx_jobs_allow_view_favorite_list',
'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_jobs_allow_view_notification_to',
Expand Down
1 change: 1 addition & 0 deletions modules/boonex/organizations/classes/BxOrgsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ function __construct($aModule)
'OBJECT_MENU_MANAGE_TOOLS' => 'bx_organizations_menu_manage_tools', //manage menu in content administration tools
'OBJECT_PAGE_VIEW_ENTRY' => 'bx_organizations_view_profile',
'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_organizations_view_profile_closed',
'OBJECT_PAGE_JOINED_ENTRY' => 'bx_organizations_join_profile',
'OBJECT_PRIVACY_VIEW' => 'bx_organizations_allow_view_to',
'OBJECT_PRIVACY_LIST_VIEW' => 'bx_organizations_allow_view_favorite_list',
'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_organizations_allow_view_notification_to',
Expand Down
1 change: 1 addition & 0 deletions modules/boonex/persons/classes/BxPersonsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ function __construct($aModule)
'OBJECT_MENU_MANAGE_TOOLS' => 'bx_persons_menu_manage_tools', //manage menu in content administration tools
'OBJECT_PAGE_VIEW_ENTRY' => 'bx_persons_view_profile',
'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_persons_view_profile_closed',
'OBJECT_PAGE_JOINED_ENTRY' => 'bx_persons_join_profile',
'OBJECT_PRIVACY_VIEW' => 'bx_persons_allow_view_to',
'OBJECT_PRIVACY_POST' => 'bx_persons_allow_post_to',
'OBJECT_PRIVACY_CONTACT' => 'bx_persons_allow_contact_to',
Expand Down
1 change: 1 addition & 0 deletions modules/boonex/spaces/classes/BxSpacesConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ function __construct($aModule)
'OBJECT_MENU_MANAGE_TOOLS' => 'bx_spaces_menu_manage_tools', //manage menu in content administration tools
'OBJECT_PAGE_VIEW_ENTRY' => 'bx_spaces_view_profile',
'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_spaces_view_profile_closed',
'OBJECT_PAGE_JOINED_ENTRY' => 'bx_spaces_join_profile',
'OBJECT_PRIVACY_VIEW' => 'bx_spaces_allow_view_to',
'OBJECT_PRIVACY_LIST_VIEW' => 'bx_spaces_allow_view_favorite_list',
'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_spaces_allow_view_notification_to',
Expand Down

0 comments on commit 85d547b

Please sign in to comment.