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:
@@ -88,8 +88,8 @@ class Photos extends \Friendica\Module\BaseProfile
|
||||
$remote_contact = $contact && !$contact['blocked'] && !$contact['pending'];
|
||||
}
|
||||
|
||||
if ($owner['hidewall'] && !$is_owner && !$remote_contact) {
|
||||
throw new HttpException\ForbiddenException($this->t('Access to this item is restricted.'));
|
||||
if ($owner['hidewall'] && !$this->session->isAuthenticated()) {
|
||||
$this->baseUrl->redirect('profile/' . $owner['nickname'] . '/restricted');
|
||||
}
|
||||
|
||||
$this->session->set('photo_return', $this->args->getCommand());
|
||||
|
||||
Reference in New Issue
Block a user