diff --git a/src/applications/people/controller/PhabricatorPeopleCalendarController.php b/src/applications/people/controller/PhabricatorPeopleCalendarController.php index 168c1def70..a5e64199c5 100644 --- a/src/applications/people/controller/PhabricatorPeopleCalendarController.php +++ b/src/applications/people/controller/PhabricatorPeopleCalendarController.php @@ -5,6 +5,10 @@ final class PhabricatorPeopleCalendarController private $username; + public function shouldAllowPublic() { + return true; + } + public function shouldRequireAdmin() { return false; } diff --git a/src/applications/people/controller/PhabricatorPeopleProfileController.php b/src/applications/people/controller/PhabricatorPeopleProfileController.php index 2067654ff0..243e0ad764 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileController.php @@ -5,6 +5,10 @@ final class PhabricatorPeopleProfileController private $username; + public function shouldAllowPublic() { + return true; + } + public function shouldRequireAdmin() { return false; } diff --git a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php index 2cb613e803..65bf9df0d5 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php @@ -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);