summaryrefslogtreecommitdiff
path: root/www-apps
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2014-02-22 17:11:52 +0100
committerBertrand Jacquin <beber@meleeweb.net>2014-02-22 17:15:40 +0100
commit7cca3bf8f6a24ffba3779c40a18859399cb5dfcb (patch)
tree8e329603a7a89405151816b04b9b25ad38a7095f /www-apps
parentsys-kernel/longterm-sources: Version bump (diff)
downloadportage-7cca3bf8f6a24ffba3779c40a18859399cb5dfcb.tar.xz
www-apps/phabricator: Add patch from Carsten Haitzler to fix public wiki
Package-Manager: portage-2.2.8-r1
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/phabricator/ChangeLog6
-rw-r--r--www-apps/phabricator/Manifest7
-rw-r--r--www-apps/phabricator/files/9999-E-Make-wiki-visible-to-all.patch (renamed from www-apps/phabricator/files/0001-Make-wiki-visible-to-all.patch)9
-rw-r--r--www-apps/phabricator/files/9999-E-public-wiki-now.patch191
-rw-r--r--www-apps/phabricator/phabricator-9999.ebuild3
5 files changed, 206 insertions, 10 deletions
diff --git a/www-apps/phabricator/ChangeLog b/www-apps/phabricator/ChangeLog
index 84f9392d..37d47d07 100644
--- a/www-apps/phabricator/ChangeLog
+++ b/www-apps/phabricator/ChangeLog
@@ -2,6 +2,12 @@
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 22 Feb 2014; Bertrand Jacquin <beber@meleeweb.net>
+ +files/9999-E-Make-wiki-visible-to-all.patch,
+ +files/9999-E-public-wiki-now.patch,
+ -files/0001-Make-wiki-visible-to-all.patch, phabricator-9999.ebuild:
+ www-apps/phabricator: Add patch from Carsten Haitzler to fix public wiki
+
11 Feb 2014; Bertrand Jacquin <beber@meleeweb.net> phabricator-9999.ebuild:
www-apps/phabricator: Move to git-r3
diff --git a/www-apps/phabricator/Manifest b/www-apps/phabricator/Manifest
index 4ec840f2..87cf9d70 100644
--- a/www-apps/phabricator/Manifest
+++ b/www-apps/phabricator/Manifest
@@ -1,10 +1,11 @@
-AUX 0001-Make-wiki-visible-to-all.patch 907 SHA256 8f145e199490c559b11865b90b694146bf2d6fa07dcdf50f34f91f44216f24c9 WHIRLPOOL b868cfd98f85eda609ec2c700b42ae1c1ec2724dba8b3bed1cc53dbbda862b294dbad9864cf95f6aab5668b15a17b6f39a25778250c38d602c28a540a7d70ad7
+AUX 9999-E-Make-wiki-visible-to-all.patch 901 SHA256 cdf6d494f7cd95e86aa070e2b7b5625e7c6e690269aea279ac56cf8920ee86ff WHIRLPOOL a08112dcd23b3295cc9ff97f54af7834198699db21115a8da11aee4fcc8f8652bec8fa265220cba65d4192b0cf932024c9bc7c3a6c0fd032e7516ada12b6542a
+AUX 9999-E-public-wiki-now.patch 8019 SHA256 00dc9b3ca8772c94348f13252f1755c8e56696782d7714e27134d18a4791a493 WHIRLPOOL 977a923c7fc568fa17c1f01dc81dccec163e25dfd42bc8746a07c0ef4f441796e6894731cbfa22dca25fe48584fe989f31cc8350516ff59fb9721512691db16d
AUX aphlictd.confd 163 SHA256 553f18f54bcf75eada649e564fea7c4c610fd01ec93708bd246263405e7d5246 WHIRLPOOL 027e41cff147fbf7544ba72575fa21e12a66da7b5cd1bdf53a98b929b7c6127c25a997118e9cfea0e00379a7937eb52b051deb4256abb5bb5d6796a9d16138ad
AUX aphlictd.initd 1049 SHA256 6f45d4e4d2d55b50b35b84c11c73628c067f5b7e4d6d88e148ebd00a1a1208cd WHIRLPOOL 2dcf7c230891e660f6dd3655ef0f04be74798f7fc98cc6191088d90ceeb7b6fe51d36ea016d625c18325f4b724a89f07b8e6c2bfd0aa6779946fe72b1702f95d
AUX htaccess 475 SHA256 90b7245b7518f5b3e56bae9d574a530e3cd47808ef937bdc78ea4288eaff0c6a WHIRLPOOL fc9123f3d40affe53314a25c2649a5b2f47640131c9bc5a6dd0c55ac36e0a205f392b403fcbce93daffceaf427c7146b7a091115a8260c7551a3bfe8069ad88e
AUX phd.confd 215 SHA256 80ddbf586f38cc600d06e524f7e85c3258bd563696fa2e41e1ea19268da8079b WHIRLPOOL 0f1a587c755994c410b62da6b897ca8684d584b9f01956359e078429fc7ec7642561dc3e3c306bbb24753e3a68ef5f088a5709706143b6154aa085ac2dfa52ad
AUX phd.initd 2108 SHA256 8475c308320ce4d51d35cbea46df61628c9c1d64eb724955a38ed49e51690cda WHIRLPOOL 4c91fcce779d423fa0fa24e744675a7dfaa57d0fe2dd86792a2c27215fc014ca85b38695909f8f6c063308a10d53c499620d909ee29382aec8097c437857988e
AUX webapp-hook 3866 SHA256 429b0dd02a50b61c71b340037687fbacd41fabaf399e6b078cdc80b7b035357e WHIRLPOOL 38395b7ba5d6ee06ccb724b12f0c2dd1192e3cc517e30eed1efbb9b4d4dcb06ab411aad0a004aa833e05f2552525f48e98e58d6915be2be4e633b7900705d831
-EBUILD phabricator-9999.ebuild 4362 SHA256 60afa703f03e18fdcfd8e863d6fbeb522b07d3c2e91e758637eb60b75a75739c WHIRLPOOL 18b9109355561e585ade2f455bdaa846801b6d085d5dfd1440ab813539e9622612a9e29a0a5c4ea54dd4e9ca7450be22f4e80e75e5d76dbc1b97f803deb9bad7
-MISC ChangeLog 5628 SHA256 750e3a52b44017ab839f1fff55f6d1c621c1194619ab02a89327fbc934ae8b18 WHIRLPOOL e03ea9ffc6963648fe8771fb31aaa48b5a81134b1f04bbf9ef4248256a94862cf138c591d7113089dbae94da49d670c006832a3e3a3c99a61829c1e3759fde4e
+EBUILD phabricator-9999.ebuild 4417 SHA256 5a032ee70dbb0ed4f5da91e1ce4438a436cd86abc6421dc7e4e64430445aef3a WHIRLPOOL c3e263fda9305fb7670936f7ccffc80b400a67ac12bde3d7f309652c5556af584d939b81063e119a861ab5c4ccc70f3e40eddde33b4ee9487f778a624926a0cc
+MISC ChangeLog 5915 SHA256 56c9fc038c65a6539daebee5bb89a427623da072783f7b81277bd2249bcb109a WHIRLPOOL 007fd0396e642b4cf3b487b815fa8185ad024b7a4497cf8e134fb3746bb99d53032c10afa8d2ffa306f78ff2d042ec4e35785d8191ba462091f6164d92300405
MISC metadata.xml 653 SHA256 744c67bfd3b874f305b08a5b68c5e2213c3cdc1c47b381fe130ebfc2005a964b WHIRLPOOL 5efd225c032e0704862510f166c94327460caf27527b473fe8f35ea6117b2b16862e362aff0b7bdb47b38349dbcf8710fff4040f11d50e07865f983dacc93d99
diff --git a/www-apps/phabricator/files/0001-Make-wiki-visible-to-all.patch b/www-apps/phabricator/files/9999-E-Make-wiki-visible-to-all.patch
index 2a3ecc3c..6623d8ef 100644
--- a/www-apps/phabricator/files/0001-Make-wiki-visible-to-all.patch
+++ b/www-apps/phabricator/files/9999-E-Make-wiki-visible-to-all.patch
@@ -1,14 +1,14 @@
-From 8f7c3736b99b5497620df020381373525b9531bf Mon Sep 17 00:00:00 2001
+From b6fedc42966b317f980d568359ee2c9e80bc528b Mon Sep 17 00:00:00 2001
From: Enlightenment <no-reply@enlightenment.org>
Date: Tue, 26 Mar 2013 06:11:16 -0700
-Subject: [PATCH] Make wiki visible to all.
+Subject: [PATCH 1/2] E: Make wiki visible to all.
---
src/applications/phriction/controller/PhrictionDocumentController.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php
-index 3cb431d..1431256 100644
+index 6f150fd..d5aa4a7 100644
--- a/src/applications/phriction/controller/PhrictionDocumentController.php
+++ b/src/applications/phriction/controller/PhrictionDocumentController.php
@@ -8,6 +8,10 @@ final class PhrictionDocumentController
@@ -22,6 +22,3 @@ index 3cb431d..1431256 100644
public function willProcessRequest(array $data) {
$this->slug = $data['slug'];
}
---
-1.8.1.5
-
diff --git a/www-apps/phabricator/files/9999-E-public-wiki-now.patch b/www-apps/phabricator/files/9999-E-public-wiki-now.patch
new file mode 100644
index 00000000..e957bdbc
--- /dev/null
+++ b/www-apps/phabricator/files/9999-E-public-wiki-now.patch
@@ -0,0 +1,191 @@
+From c06f365d35bd4fe1887db6b0bed6af2816e04446 Mon Sep 17 00:00:00 2001
+From: Carsten Haitzler <raster@rasterman.com>
+Date: Mon, 10 Feb 2014 19:32:45 +0900
+Subject: [PATCH 2/2] E: public wiki now
+
+after many hours of futzing about in phab.. i've gotten itback to where it once
+was... with a publicly readable wiki! yay! problem is - not really possible to
+track changes due to the install not being a git tree.
+---
+ .../base/controller/PhabricatorController.php | 2 +-
+ .../countdown/storage/PhabricatorCountdown.php | 2 +-
+ src/applications/files/storage/PhabricatorFile.php | 2 +-
+ .../maniphest/query/ManiphestTaskSearchEngine.php | 3 ++-
+ .../phriction/controller/PhrictionController.php | 19 ++++++++++++-------
+ .../controller/PhrictionDocumentController.php | 15 +++++++++++----
+ .../phriction/storage/PhrictionDocument.php | 5 ++++-
+ 7 files changed, 32 insertions(+), 16 deletions(-)
+
+diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php
+index eb31ff9..a8fb8bf 100644
+--- a/src/applications/base/controller/PhabricatorController.php
++++ b/src/applications/base/controller/PhabricatorController.php
+@@ -5,7 +5,7 @@ abstract class PhabricatorController extends AphrontController {
+ private $handles;
+
+ public function shouldRequireLogin() {
+- return true;
++ return false;
+ }
+
+ public function shouldRequireAdmin() {
+diff --git a/src/applications/countdown/storage/PhabricatorCountdown.php b/src/applications/countdown/storage/PhabricatorCountdown.php
+index b69a9d5..dc19ec5 100644
+--- a/src/applications/countdown/storage/PhabricatorCountdown.php
++++ b/src/applications/countdown/storage/PhabricatorCountdown.php
+@@ -49,7 +49,7 @@ final class PhabricatorCountdown
+ public function getPolicy($capability) {
+ switch ($capability) {
+ case PhabricatorPolicyCapability::CAN_VIEW:
+- return $this->getViewPolicy();
++ return PhabricatorPolicies::POLICY_PUBLIC;
+ case PhabricatorPolicyCapability::CAN_EDIT:
+ return PhabricatorPolicies::POLICY_NOONE;
+ }
+diff --git a/src/applications/files/storage/PhabricatorFile.php b/src/applications/files/storage/PhabricatorFile.php
+index dc6ad6d..47594cc 100644
+--- a/src/applications/files/storage/PhabricatorFile.php
++++ b/src/applications/files/storage/PhabricatorFile.php
+@@ -887,7 +887,7 @@ final class PhabricatorFile extends PhabricatorFileDAO
+ public function getPolicy($capability) {
+ switch ($capability) {
+ case PhabricatorPolicyCapability::CAN_VIEW:
+- return $this->getViewPolicy();
++ return PhabricatorPolicies::POLICY_PUBLIC;
+ case PhabricatorPolicyCapability::CAN_EDIT:
+ return PhabricatorPolicies::POLICY_NOONE;
+ }
+diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
+index df9deff..f1f8a21 100644
+--- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
++++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
+@@ -359,13 +359,14 @@ final class ManiphestTaskSearchEngine
+ public function getBuiltinQueryNames() {
+ $names = array();
+
++ $names['open'] = pht('Open Tasks');
++
+ if ($this->requireViewer()->isLoggedIn()) {
+ $names['assigned'] = pht('Assigned');
+ $names['authored'] = pht('Authored');
+ $names['subscribed'] = pht('Subscribed');
+ }
+
+- $names['open'] = pht('Open Tasks');
+ $names['all'] = pht('All Tasks');
+
+ return $names;
+diff --git a/src/applications/phriction/controller/PhrictionController.php b/src/applications/phriction/controller/PhrictionController.php
+index c8d93ff..591bd7f 100644
+--- a/src/applications/phriction/controller/PhrictionController.php
++++ b/src/applications/phriction/controller/PhrictionController.php
+@@ -12,7 +12,9 @@ abstract class PhrictionController extends PhabricatorController {
+ $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
+
+ if ($for_app) {
+- $nav->addFilter('create', pht('New Document'));
++ if ($user->isLoggedIn()) {
++ $nav->addFilter('create', pht('New Document'));
++ }
+ $nav->addFilter('/phriction/', pht('Index'));
+ }
+
+@@ -31,6 +33,7 @@ abstract class PhrictionController extends PhabricatorController {
+
+ public function buildApplicationCrumbs() {
+ $crumbs = parent::buildApplicationCrumbs();
++ $user = $this->getRequest()->getUser();
+
+ if (get_class($this) != 'PhrictionListController') {
+ $crumbs->addAction(
+@@ -40,12 +43,14 @@ abstract class PhrictionController extends PhabricatorController {
+ ->setIcon('transcript'));
+ }
+
+- $crumbs->addAction(
+- id(new PHUIListItemView())
+- ->setName(pht('New Document'))
+- ->setHref('/phriction/new/?slug='.$this->getDocumentSlug())
+- ->setWorkflow(true)
+- ->setIcon('create'));
++ if ($user->isLoggedIn()) {
++ $crumbs->addAction(
++ id(new PHUIListItemView())
++ ->setName(pht('New Document'))
++ ->setHref('/phriction/new/?slug='.$this->getDocumentSlug())
++ ->setWorkflow(true)
++ ->setIcon('create'));
++ }
+
+ return $crumbs;
+ }
+diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php
+index d5aa4a7..be3b067 100644
+--- a/src/applications/phriction/controller/PhrictionDocumentController.php
++++ b/src/applications/phriction/controller/PhrictionDocumentController.php
+@@ -277,20 +277,25 @@ final class PhrictionDocumentController
+ ->setUser($user)
+ ->setObjectURI($this->getRequest()->getRequestURI())
+ ->setObject($document);
++ if (!$user->isLoggedIn()) {
++ return $action_view;
++ }
+
+ if (!$document->getID()) {
+ return $action_view->addAction(
+ id(new PhabricatorActionView())
+ ->setName(pht('Create This Document'))
+ ->setIcon('create')
+- ->setHref('/phriction/edit/?slug='.$slug));
++ ->setHref('/phriction/edit/?slug='.$slug)
++ ->setDisabled(!$can_edit));
+ }
+
+ $action_view->addAction(
+ id(new PhabricatorActionView())
+ ->setName(pht('Edit Document'))
+ ->setIcon('edit')
+- ->setHref('/phriction/edit/'.$document->getID().'/'));
++ ->setHref('/phriction/edit/'.$document->getID().'/')
++ ->setDisabled(!$can_edit));
+
+ if ($document->getStatus() == PhrictionDocumentStatus::STATUS_EXISTS) {
+ $action_view->addAction(
+@@ -298,14 +303,16 @@ final class PhrictionDocumentController
+ ->setName(pht('Move Document'))
+ ->setIcon('move')
+ ->setHref('/phriction/move/'.$document->getID().'/')
+- ->setWorkflow(true));
++ ->setWorkflow(true)
++ ->setDisabled(!$can_edit));
+
+ $action_view->addAction(
+ id(new PhabricatorActionView())
+ ->setName(pht('Delete Document'))
+ ->setIcon('delete')
+ ->setHref('/phriction/delete/'.$document->getID().'/')
+- ->setWorkflow(true));
++ ->setWorkflow(true)
++ ->setDisabled(!$can_edit));
+ }
+
+ return
+diff --git a/src/applications/phriction/storage/PhrictionDocument.php b/src/applications/phriction/storage/PhrictionDocument.php
+index 6cb0658..550393d 100644
+--- a/src/applications/phriction/storage/PhrictionDocument.php
++++ b/src/applications/phriction/storage/PhrictionDocument.php
+@@ -116,10 +116,13 @@ final class PhrictionDocument extends PhrictionDAO
+ }
+
+ public function getPolicy($capability) {
++ switch ($capability) {
++ case PhabricatorPolicyCapability::CAN_VIEW:
++ return PhabricatorPolicies::POLICY_PUBLIC;
++ }
+ if ($this->hasProject()) {
+ return $this->getProject()->getPolicy($capability);
+ }
+- return PhabricatorPolicies::POLICY_USER;
+ }
+
+ public function hasAutomaticCapability($capability, PhabricatorUser $user) {
diff --git a/www-apps/phabricator/phabricator-9999.ebuild b/www-apps/phabricator/phabricator-9999.ebuild
index ea5e67e9..4b77a701 100644
--- a/www-apps/phabricator/phabricator-9999.ebuild
+++ b/www-apps/phabricator/phabricator-9999.ebuild
@@ -52,7 +52,8 @@ pkg_setup() {
}
src_prepare() {
- epatch "${FILESDIR}/0001-Make-wiki-visible-to-all.patch"
+ epatch "${FILESDIR}/${PV}-E-Make-wiki-visible-to-all.patch"
+ epatch "${FILESDIR}/${PV}-E-public-wiki-now.patch"
find -type f -name .gitignore -print0 \
| xargs -0 --no-run-if-empty -- \