mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
Allow public viewing of profiles and people calendars
Summary: Ref T4830, this allows profile view and calendar profile view to be publicly visible. Also adds a note reminding the user of visibility. Test Plan: Log out, visit a profile and various links. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T4830 Differential Revision: https://secure.phabricator.com/D13676
This commit is contained in:
parent
602bc4e2fd
commit
cf83db15d6
3 changed files with 19 additions and 1 deletions
|
@ -5,6 +5,10 @@ final class PhabricatorPeopleCalendarController
|
|||
|
||||
private $username;
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldRequireAdmin() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,10 @@ final class PhabricatorPeopleProfileController
|
|||
|
||||
private $username;
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldRequireAdmin() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -66,15 +66,25 @@ final class PhabricatorPeopleProfileEditController
|
|||
->setUser($viewer);
|
||||
|
||||
$field_list->appendFieldsToForm($form);
|
||||
|
||||
$form
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->addCancelButton($profile_uri)
|
||||
->setValue(pht('Save Profile')));
|
||||
|
||||
$allow_public = PhabricatorEnv::getEnvConfig('policy.allow-public');
|
||||
$note = null;
|
||||
if ($allow_public) {
|
||||
$note = id(new PHUIInfoView())
|
||||
->setSeverity(PHUIInfoView::SEVERITY_WARNING)
|
||||
->appendChild(pht(
|
||||
'Information on user profiles on this install is publicly '.
|
||||
'visible.'));
|
||||
}
|
||||
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Edit Profile'))
|
||||
->setInfoView($note)
|
||||
->setValidationException($validation_exception)
|
||||
->setForm($form);
|
||||
|
||||
|
|
Loading…
Reference in a new issue