mirror of
https://github.com/friendica/friendica
synced 2025-05-21 23:44:12 +02:00
Tighten profile restriction feature
- Prevent feed access to restricted profiles - Rework display of restricted profiles with a redirect to the profile/restricted route - Normalize permission checking with IHandleUserSession->isAuthenticated - Remove unusable "nocache" parameter in feed module because session isn't initialized - Reword setting name and description
This commit is contained in:
parent
0d53c69610
commit
b83526ad0b
16 changed files with 135 additions and 84 deletions
|
@ -105,9 +105,8 @@ class Status extends BaseProfile
|
|||
$is_owner = DI::userSession()->getLocalUserId() == $profile['uid'];
|
||||
$last_updated_key = "profile:" . $profile['uid'] . ":" . DI::userSession()->getLocalUserId() . ":" . $remote_contact;
|
||||
|
||||
if (!empty($profile['hidewall']) && !$is_owner && !$remote_contact) {
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Access to this profile has been restricted.'));
|
||||
return '';
|
||||
if (!empty($profile['hidewall']) && !DI::userSession()->isAuthenticated()) {
|
||||
$this->baseUrl->redirect('profile/' . $profile['nickname'] . '/restricted');
|
||||
}
|
||||
|
||||
$o .= self::getTabsHTML($a, 'status', $is_owner, $profile['nickname'], $profile['hide-friends']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue