1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Support logged-out access to more Harbormaster controllers

Summary:
Fixes T13145. The list controllers properly support public access already, but some of the view/detail controllers did not.

Allow logged-out users to browse builds, buildables, plans, etc., provided they can see the corresponding objects.

Test Plan: As a logged-out user, browsed around builds, build plans, logs, etc., without hitting any login pages.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13145

Differential Revision: https://secure.phabricator.com/D19459
This commit is contained in:
epriestley 2018-06-01 13:52:41 -07:00
parent 5bcca675e1
commit 376ea1ddf5
10 changed files with 40 additions and 2 deletions

View file

@ -3,6 +3,10 @@
final class HarbormasterBuildLogDownloadController
extends HarbormasterController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$request = $this->getRequest();
$viewer = $request->getUser();

View file

@ -3,6 +3,10 @@
final class HarbormasterBuildLogRenderController
extends HarbormasterController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();

View file

@ -3,6 +3,10 @@
final class HarbormasterBuildLogViewController
extends HarbormasterController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();

View file

@ -3,6 +3,10 @@
final class HarbormasterBuildViewController
extends HarbormasterController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$request = $this->getRequest();
$viewer = $request->getUser();

View file

@ -3,6 +3,10 @@
final class HarbormasterBuildableViewController
extends HarbormasterController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
@ -350,6 +354,4 @@ final class HarbormasterBuildableViewController
return array($lint, $unit);
}
}

View file

@ -3,6 +3,10 @@
final class HarbormasterLintMessagesController
extends HarbormasterController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();

View file

@ -2,6 +2,10 @@
final class HarbormasterPlanViewController extends HarbormasterPlanController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
$id = $request->getURIData('id');

View file

@ -3,6 +3,10 @@
final class HarbormasterStepViewController
extends HarbormasterPlanController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
$id = $request->getURIData('id');

View file

@ -3,6 +3,10 @@
final class HarbormasterUnitMessageListController
extends HarbormasterController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();

View file

@ -3,6 +3,10 @@
final class HarbormasterUnitMessageViewController
extends HarbormasterController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();