diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 2462868c0f..e5d5786142 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'cea72e09', 'conpherence.pkg.js' => '6249a1cf', - 'core.pkg.css' => 'c99a9eb4', + 'core.pkg.css' => 'd2126ffb', 'core.pkg.js' => '1a77dddf', 'darkconsole.pkg.js' => 'e7393ebb', 'differential.pkg.css' => 'a4ba74b5', @@ -21,7 +21,7 @@ return array( 'maniphest.pkg.js' => '949a7498', 'rsrc/css/aphront/aphront-bars.css' => '231ac33c', 'rsrc/css/aphront/dark-console.css' => 'f54bf286', - 'rsrc/css/aphront/dialog-view.css' => '84f1e6a6', + 'rsrc/css/aphront/dialog-view.css' => '1e6b8603', 'rsrc/css/aphront/lightbox-attachment.css' => '7acac05d', 'rsrc/css/aphront/list-filter-view.css' => '5d6f0526', 'rsrc/css/aphront/multi-column.css' => '84cc6640', @@ -143,7 +143,7 @@ return array( 'rsrc/css/phui/phui-form-view.css' => 'b5bfd17a', 'rsrc/css/phui/phui-form.css' => 'aac1d51d', 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', - 'rsrc/css/phui/phui-header-view.css' => '06385974', + 'rsrc/css/phui/phui-header-view.css' => '6ec8f155', 'rsrc/css/phui/phui-hovercard.css' => 'de1a2119', 'rsrc/css/phui/phui-icon-set-selector.css' => '1ab67aad', 'rsrc/css/phui/phui-icon.css' => '417f80fb', @@ -553,7 +553,7 @@ return array( 'almanac-css' => 'dbb9b3af', 'aphront-bars' => '231ac33c', 'aphront-dark-console-css' => 'f54bf286', - 'aphront-dialog-view-css' => '84f1e6a6', + 'aphront-dialog-view-css' => '1e6b8603', 'aphront-list-filter-view-css' => '5d6f0526', 'aphront-multi-column-view-css' => '84cc6640', 'aphront-panel-view-css' => '8427b78d', @@ -867,7 +867,7 @@ return array( 'phui-form-css' => 'aac1d51d', 'phui-form-view-css' => 'b5bfd17a', 'phui-head-thing-view-css' => 'fd311e5f', - 'phui-header-view-css' => '06385974', + 'phui-header-view-css' => '6ec8f155', 'phui-hovercard' => '1bd28176', 'phui-hovercard-view-css' => 'de1a2119', 'phui-icon-set-selector-css' => '1ab67aad', diff --git a/src/applications/almanac/storage/AlmanacDevice.php b/src/applications/almanac/storage/AlmanacDevice.php index d2a3e4a763..2f89e6c2b6 100644 --- a/src/applications/almanac/storage/AlmanacDevice.php +++ b/src/applications/almanac/storage/AlmanacDevice.php @@ -167,10 +167,6 @@ final class AlmanacDevice return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorExtendedPolicyInterface )--------------------------------- */ diff --git a/src/applications/almanac/storage/AlmanacNamespace.php b/src/applications/almanac/storage/AlmanacNamespace.php index 4bbb4d4090..7a8a4a20f0 100644 --- a/src/applications/almanac/storage/AlmanacNamespace.php +++ b/src/applications/almanac/storage/AlmanacNamespace.php @@ -174,10 +174,6 @@ final class AlmanacNamespace return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorApplicationTransactionInterface )------------------------- */ diff --git a/src/applications/almanac/storage/AlmanacNetwork.php b/src/applications/almanac/storage/AlmanacNetwork.php index 2f37ab4778..737f38faec 100644 --- a/src/applications/almanac/storage/AlmanacNetwork.php +++ b/src/applications/almanac/storage/AlmanacNetwork.php @@ -92,10 +92,6 @@ final class AlmanacNetwork return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorDestructibleInterface )----------------------------------- */ diff --git a/src/applications/almanac/storage/AlmanacService.php b/src/applications/almanac/storage/AlmanacService.php index 37c3a44ba6..9ef42d6407 100644 --- a/src/applications/almanac/storage/AlmanacService.php +++ b/src/applications/almanac/storage/AlmanacService.php @@ -184,10 +184,6 @@ final class AlmanacService return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorExtendedPolicyInterface )--------------------------------- */ diff --git a/src/applications/auth/storage/PhabricatorAuthProviderConfig.php b/src/applications/auth/storage/PhabricatorAuthProviderConfig.php index 14d68b352b..ba9b43a967 100644 --- a/src/applications/auth/storage/PhabricatorAuthProviderConfig.php +++ b/src/applications/auth/storage/PhabricatorAuthProviderConfig.php @@ -130,8 +130,4 @@ final class PhabricatorAuthProviderConfig return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/auth/storage/PhabricatorAuthTemporaryToken.php b/src/applications/auth/storage/PhabricatorAuthTemporaryToken.php index be08f5db2d..76e9358831 100644 --- a/src/applications/auth/storage/PhabricatorAuthTemporaryToken.php +++ b/src/applications/auth/storage/PhabricatorAuthTemporaryToken.php @@ -125,8 +125,4 @@ final class PhabricatorAuthTemporaryToken extends PhabricatorAuthDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/badges/storage/PhabricatorBadgesAward.php b/src/applications/badges/storage/PhabricatorBadgesAward.php index 851ac87002..3f1472258f 100644 --- a/src/applications/badges/storage/PhabricatorBadgesAward.php +++ b/src/applications/badges/storage/PhabricatorBadgesAward.php @@ -76,8 +76,4 @@ final class PhabricatorBadgesAward extends PhabricatorBadgesDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/badges/storage/PhabricatorBadgesBadge.php b/src/applications/badges/storage/PhabricatorBadgesBadge.php index be83c8404f..d14d49a57c 100644 --- a/src/applications/badges/storage/PhabricatorBadgesBadge.php +++ b/src/applications/badges/storage/PhabricatorBadgesBadge.php @@ -129,10 +129,6 @@ final class PhabricatorBadgesBadge extends PhabricatorBadgesDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorApplicationTransactionInterface )------------------------- */ diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php index b45b1be102..1dd6bb887c 100644 --- a/src/applications/base/PhabricatorApplication.php +++ b/src/applications/base/PhabricatorApplication.php @@ -483,10 +483,6 @@ abstract class PhabricatorApplication return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( Policies )----------------------------------------------------------- */ diff --git a/src/applications/calendar/storage/PhabricatorCalendarEventInvitee.php b/src/applications/calendar/storage/PhabricatorCalendarEventInvitee.php index b238b614ab..23c9ad33df 100644 --- a/src/applications/calendar/storage/PhabricatorCalendarEventInvitee.php +++ b/src/applications/calendar/storage/PhabricatorCalendarEventInvitee.php @@ -121,7 +121,4 @@ final class PhabricatorCalendarEventInvitee extends PhabricatorCalendarDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } } diff --git a/src/applications/calendar/storage/PhabricatorCalendarExport.php b/src/applications/calendar/storage/PhabricatorCalendarExport.php index 75e83dfaf0..5a8ad84da4 100644 --- a/src/applications/calendar/storage/PhabricatorCalendarExport.php +++ b/src/applications/calendar/storage/PhabricatorCalendarExport.php @@ -159,11 +159,6 @@ final class PhabricatorCalendarExport extends PhabricatorCalendarDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - - /* -( PhabricatorApplicationTransactionInterface )------------------------- */ diff --git a/src/applications/calendar/storage/PhabricatorCalendarExternalInvitee.php b/src/applications/calendar/storage/PhabricatorCalendarExternalInvitee.php index b1a85cf520..27a23d1e17 100644 --- a/src/applications/calendar/storage/PhabricatorCalendarExternalInvitee.php +++ b/src/applications/calendar/storage/PhabricatorCalendarExternalInvitee.php @@ -68,7 +68,4 @@ final class PhabricatorCalendarExternalInvitee return false; } - public function describeAutomaticCapability($capability) { - return null; - } } diff --git a/src/applications/calendar/storage/PhabricatorCalendarImport.php b/src/applications/calendar/storage/PhabricatorCalendarImport.php index 7fdb3cd837..1c7c1a5431 100644 --- a/src/applications/calendar/storage/PhabricatorCalendarImport.php +++ b/src/applications/calendar/storage/PhabricatorCalendarImport.php @@ -132,10 +132,6 @@ final class PhabricatorCalendarImport return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorApplicationTransactionInterface )------------------------- */ diff --git a/src/applications/calendar/storage/PhabricatorCalendarImportLog.php b/src/applications/calendar/storage/PhabricatorCalendarImportLog.php index e25a3090e0..14108f8ca7 100644 --- a/src/applications/calendar/storage/PhabricatorCalendarImportLog.php +++ b/src/applications/calendar/storage/PhabricatorCalendarImportLog.php @@ -86,10 +86,6 @@ final class PhabricatorCalendarImportLog return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorDestructibleInterface )----------------------------------- */ diff --git a/src/applications/chatlog/storage/PhabricatorChatLogChannel.php b/src/applications/chatlog/storage/PhabricatorChatLogChannel.php index d9b9ef67e9..2e62bcb6cf 100644 --- a/src/applications/chatlog/storage/PhabricatorChatLogChannel.php +++ b/src/applications/chatlog/storage/PhabricatorChatLogChannel.php @@ -48,8 +48,4 @@ final class PhabricatorChatLogChannel return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/chatlog/storage/PhabricatorChatLogEvent.php b/src/applications/chatlog/storage/PhabricatorChatLogEvent.php index 1513e12a82..a510c333dc 100644 --- a/src/applications/chatlog/storage/PhabricatorChatLogEvent.php +++ b/src/applications/chatlog/storage/PhabricatorChatLogEvent.php @@ -56,8 +56,4 @@ final class PhabricatorChatLogEvent return $this->getChannel()->hasAutomaticCapability($capability, $viewer); } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/conduit/method/ConduitAPIMethod.php b/src/applications/conduit/method/ConduitAPIMethod.php index 7992518919..bc3f9e44e0 100644 --- a/src/applications/conduit/method/ConduitAPIMethod.php +++ b/src/applications/conduit/method/ConduitAPIMethod.php @@ -372,10 +372,6 @@ abstract class ConduitAPIMethod return false; } - public function describeAutomaticCapability($capability) { - return null; - } - protected function hasApplicationCapability( $capability, PhabricatorUser $viewer) { diff --git a/src/applications/conduit/storage/PhabricatorConduitMethodCallLog.php b/src/applications/conduit/storage/PhabricatorConduitMethodCallLog.php index 2e3f12b0e1..7387b64e53 100644 --- a/src/applications/conduit/storage/PhabricatorConduitMethodCallLog.php +++ b/src/applications/conduit/storage/PhabricatorConduitMethodCallLog.php @@ -52,8 +52,4 @@ final class PhabricatorConduitMethodCallLog return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/config/storage/PhabricatorConfigEntry.php b/src/applications/config/storage/PhabricatorConfigEntry.php index 53935d4ab0..a8f00133a9 100644 --- a/src/applications/config/storage/PhabricatorConfigEntry.php +++ b/src/applications/config/storage/PhabricatorConfigEntry.php @@ -95,8 +95,4 @@ final class PhabricatorConfigEntry return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/countdown/storage/PhabricatorCountdown.php b/src/applications/countdown/storage/PhabricatorCountdown.php index ad9b1b33aa..34249b9ab4 100644 --- a/src/applications/countdown/storage/PhabricatorCountdown.php +++ b/src/applications/countdown/storage/PhabricatorCountdown.php @@ -139,10 +139,6 @@ final class PhabricatorCountdown extends PhabricatorCountdownDAO return false; } - public function describeAutomaticCapability($capability) { - return false; - } - /* -( PhabricatorSpacesInterface )------------------------------------------- */ public function getSpacePHID() { diff --git a/src/applications/daemon/storage/PhabricatorDaemonLog.php b/src/applications/daemon/storage/PhabricatorDaemonLog.php index 2d005e33e0..2e61da3872 100644 --- a/src/applications/daemon/storage/PhabricatorDaemonLog.php +++ b/src/applications/daemon/storage/PhabricatorDaemonLog.php @@ -77,8 +77,4 @@ final class PhabricatorDaemonLog extends PhabricatorDaemonDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/dashboard/storage/PhabricatorDashboard.php b/src/applications/dashboard/storage/PhabricatorDashboard.php index 297ac8aea0..2930ca7674 100644 --- a/src/applications/dashboard/storage/PhabricatorDashboard.php +++ b/src/applications/dashboard/storage/PhabricatorDashboard.php @@ -160,10 +160,6 @@ final class PhabricatorDashboard extends PhabricatorDashboardDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorDestructibleInterface )----------------------------------- */ diff --git a/src/applications/dashboard/storage/PhabricatorDashboardPanel.php b/src/applications/dashboard/storage/PhabricatorDashboardPanel.php index 5dae421674..64e6ea5b87 100644 --- a/src/applications/dashboard/storage/PhabricatorDashboardPanel.php +++ b/src/applications/dashboard/storage/PhabricatorDashboardPanel.php @@ -159,10 +159,6 @@ final class PhabricatorDashboardPanel return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorCustomFieldInterface )------------------------------------ */ diff --git a/src/applications/differential/storage/DifferentialChangeset.php b/src/applications/differential/storage/DifferentialChangeset.php index 18cafad137..4d7b9f5698 100644 --- a/src/applications/differential/storage/DifferentialChangeset.php +++ b/src/applications/differential/storage/DifferentialChangeset.php @@ -226,8 +226,4 @@ final class DifferentialChangeset extends DifferentialDAO return $this->getDiff()->hasAutomaticCapability($capability, $viewer); } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/differential/storage/DifferentialHunk.php b/src/applications/differential/storage/DifferentialHunk.php index bd13cadfec..fcc7926590 100644 --- a/src/applications/differential/storage/DifferentialHunk.php +++ b/src/applications/differential/storage/DifferentialHunk.php @@ -228,8 +228,4 @@ abstract class DifferentialHunk extends DifferentialDAO return $this->getChangeset()->hasAutomaticCapability($capability, $viewer); } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/diviner/storage/DivinerLiveBook.php b/src/applications/diviner/storage/DivinerLiveBook.php index 079c5a9f4c..07089264ae 100644 --- a/src/applications/diviner/storage/DivinerLiveBook.php +++ b/src/applications/diviner/storage/DivinerLiveBook.php @@ -114,10 +114,6 @@ final class DivinerLiveBook extends DivinerDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorDestructibleInterface )----------------------------------- */ diff --git a/src/applications/doorkeeper/storage/DoorkeeperExternalObject.php b/src/applications/doorkeeper/storage/DoorkeeperExternalObject.php index 9d8d3bc967..a4ce41adac 100644 --- a/src/applications/doorkeeper/storage/DoorkeeperExternalObject.php +++ b/src/applications/doorkeeper/storage/DoorkeeperExternalObject.php @@ -121,8 +121,4 @@ final class DoorkeeperExternalObject extends DoorkeeperDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/drydock/storage/DrydockBlueprint.php b/src/applications/drydock/storage/DrydockBlueprint.php index afd3b771ca..f7654a8b31 100644 --- a/src/applications/drydock/storage/DrydockBlueprint.php +++ b/src/applications/drydock/storage/DrydockBlueprint.php @@ -325,10 +325,6 @@ final class DrydockBlueprint extends DrydockDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorCustomFieldInterface )------------------------------------ */ diff --git a/src/applications/feed/story/PhabricatorFeedStory.php b/src/applications/feed/story/PhabricatorFeedStory.php index d586104e70..8a15301216 100644 --- a/src/applications/feed/story/PhabricatorFeedStory.php +++ b/src/applications/feed/story/PhabricatorFeedStory.php @@ -454,11 +454,6 @@ abstract class PhabricatorFeedStory } - public function describeAutomaticCapability($capability) { - return null; - } - - /* -( PhabricatorMarkupInterface Implementation )--------------------------- */ diff --git a/src/applications/files/storage/PhabricatorFileChunk.php b/src/applications/files/storage/PhabricatorFileChunk.php index eaa10acd63..648ec18c6b 100644 --- a/src/applications/files/storage/PhabricatorFileChunk.php +++ b/src/applications/files/storage/PhabricatorFileChunk.php @@ -77,11 +77,6 @@ final class PhabricatorFileChunk extends PhabricatorFileDAO } - public function describeAutomaticCapability($capability) { - return null; - } - - /* -( PhabricatorDestructibleInterface )----------------------------------- */ diff --git a/src/applications/legalpad/storage/LegalpadDocumentSignature.php b/src/applications/legalpad/storage/LegalpadDocumentSignature.php index a811169cf7..1cd0875dda 100644 --- a/src/applications/legalpad/storage/LegalpadDocumentSignature.php +++ b/src/applications/legalpad/storage/LegalpadDocumentSignature.php @@ -93,8 +93,4 @@ final class LegalpadDocumentSignature return ($viewer->getPHID() == $this->getSignerPHID()); } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/macro/storage/PhabricatorFileImageMacro.php b/src/applications/macro/storage/PhabricatorFileImageMacro.php index 37f0d5c06b..bc23e639d7 100644 --- a/src/applications/macro/storage/PhabricatorFileImageMacro.php +++ b/src/applications/macro/storage/PhabricatorFileImageMacro.php @@ -139,8 +139,4 @@ final class PhabricatorFileImageMacro extends PhabricatorFileDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/nuance/storage/NuanceImportCursorData.php b/src/applications/nuance/storage/NuanceImportCursorData.php index 01f3d56c6d..bbd00f5cc5 100644 --- a/src/applications/nuance/storage/NuanceImportCursorData.php +++ b/src/applications/nuance/storage/NuanceImportCursorData.php @@ -63,8 +63,4 @@ final class NuanceImportCursorData return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/nuance/storage/NuanceItemCommand.php b/src/applications/nuance/storage/NuanceItemCommand.php index 94409dd89a..bda6860ff5 100644 --- a/src/applications/nuance/storage/NuanceItemCommand.php +++ b/src/applications/nuance/storage/NuanceItemCommand.php @@ -48,8 +48,4 @@ final class NuanceItemCommand return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/nuance/storage/NuanceQueue.php b/src/applications/nuance/storage/NuanceQueue.php index 15197d9bd8..9691a42e2f 100644 --- a/src/applications/nuance/storage/NuanceQueue.php +++ b/src/applications/nuance/storage/NuanceQueue.php @@ -67,10 +67,6 @@ final class NuanceQueue return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorApplicationTransactionInterface )------------------------- */ diff --git a/src/applications/nuance/storage/NuanceSource.php b/src/applications/nuance/storage/NuanceSource.php index 8ab934e247..c3f1d57c9b 100644 --- a/src/applications/nuance/storage/NuanceSource.php +++ b/src/applications/nuance/storage/NuanceSource.php @@ -138,10 +138,6 @@ final class NuanceSource extends NuanceDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorNgramsInterface )----------------------------------------- */ diff --git a/src/applications/oauthserver/storage/PhabricatorOAuthServerClient.php b/src/applications/oauthserver/storage/PhabricatorOAuthServerClient.php index 4a4f48bfed..4154383c30 100644 --- a/src/applications/oauthserver/storage/PhabricatorOAuthServerClient.php +++ b/src/applications/oauthserver/storage/PhabricatorOAuthServerClient.php @@ -83,10 +83,6 @@ final class PhabricatorOAuthServerClient return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorApplicationTransactionInterface )------------------------- */ diff --git a/src/applications/packages/storage/PhabricatorPackagesPackage.php b/src/applications/packages/storage/PhabricatorPackagesPackage.php index fe4dd99162..53e040e5f4 100644 --- a/src/applications/packages/storage/PhabricatorPackagesPackage.php +++ b/src/applications/packages/storage/PhabricatorPackagesPackage.php @@ -158,10 +158,6 @@ final class PhabricatorPackagesPackage return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorDestructibleInterface )----------------------------------- */ diff --git a/src/applications/packages/storage/PhabricatorPackagesPublisher.php b/src/applications/packages/storage/PhabricatorPackagesPublisher.php index 0cf7e627d1..57737cdab9 100644 --- a/src/applications/packages/storage/PhabricatorPackagesPublisher.php +++ b/src/applications/packages/storage/PhabricatorPackagesPublisher.php @@ -134,10 +134,6 @@ final class PhabricatorPackagesPublisher return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorDestructibleInterface )----------------------------------- */ diff --git a/src/applications/packages/storage/PhabricatorPackagesVersion.php b/src/applications/packages/storage/PhabricatorPackagesVersion.php index 65ee005ff8..aba2473073 100644 --- a/src/applications/packages/storage/PhabricatorPackagesVersion.php +++ b/src/applications/packages/storage/PhabricatorPackagesVersion.php @@ -126,10 +126,6 @@ final class PhabricatorPackagesVersion return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorExtendedPolicyInterface )--------------------------------- */ diff --git a/src/applications/passphrase/storage/PassphraseCredential.php b/src/applications/passphrase/storage/PassphraseCredential.php index 88bc4595bd..d57c7405d5 100644 --- a/src/applications/passphrase/storage/PassphraseCredential.php +++ b/src/applications/passphrase/storage/PassphraseCredential.php @@ -155,10 +155,6 @@ final class PassphraseCredential extends PassphraseDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorSubscribableInterface )----------------------------------- */ diff --git a/src/applications/phlux/storage/PhluxVariable.php b/src/applications/phlux/storage/PhluxVariable.php index a4ade1e9c7..875b3dee92 100644 --- a/src/applications/phlux/storage/PhluxVariable.php +++ b/src/applications/phlux/storage/PhluxVariable.php @@ -80,8 +80,4 @@ final class PhluxVariable extends PhluxDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/pholio/storage/PholioImage.php b/src/applications/pholio/storage/PholioImage.php index 29b649dd14..e81c71a05a 100644 --- a/src/applications/pholio/storage/PholioImage.php +++ b/src/applications/pholio/storage/PholioImage.php @@ -119,8 +119,4 @@ final class PholioImage extends PholioDAO return $this->getMock()->hasAutomaticCapability($capability, $viewer); } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/phortune/storage/PhortuneProduct.php b/src/applications/phortune/storage/PhortuneProduct.php index a3f89ffec3..18fc553e87 100644 --- a/src/applications/phortune/storage/PhortuneProduct.php +++ b/src/applications/phortune/storage/PhortuneProduct.php @@ -110,8 +110,4 @@ final class PhortuneProduct extends PhortuneDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/phragment/storage/PhragmentFragment.php b/src/applications/phragment/storage/PhragmentFragment.php index 1ab156e60f..af733ab730 100644 --- a/src/applications/phragment/storage/PhragmentFragment.php +++ b/src/applications/phragment/storage/PhragmentFragment.php @@ -345,8 +345,4 @@ final class PhragmentFragment extends PhragmentDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/policy/__tests__/PhabricatorPolicyTestObject.php b/src/applications/policy/__tests__/PhabricatorPolicyTestObject.php index 0e8d4c4957..efd500d438 100644 --- a/src/applications/policy/__tests__/PhabricatorPolicyTestObject.php +++ b/src/applications/policy/__tests__/PhabricatorPolicyTestObject.php @@ -52,10 +52,6 @@ final class PhabricatorPolicyTestObject return $this; } - public function describeAutomaticCapability($capability) { - return null; - } - public function setExtendedPolicies(array $extended_policies) { $this->extendedPolicies = $extended_policies; return $this; diff --git a/src/applications/policy/controller/PhabricatorPolicyExplainController.php b/src/applications/policy/controller/PhabricatorPolicyExplainController.php index 5030c4d636..ef61272d88 100644 --- a/src/applications/policy/controller/PhabricatorPolicyExplainController.php +++ b/src/applications/policy/controller/PhabricatorPolicyExplainController.php @@ -262,47 +262,16 @@ final class PhabricatorPolicyExplainController $capability) { $viewer = $this->getViewer(); - if ($object instanceof PhabricatorPolicyCodexInterface) { - $codex = PhabricatorPolicyCodex::newFromObject($object, $viewer); - $rules = $codex->getPolicySpecialRuleDescriptions(); - - $exceptions = array(); - foreach ($rules as $rule) { - $is_active = $rule->getIsActive(); - if ($is_active) { - $rule_capabilities = $rule->getCapabilities(); - if ($rule_capabilities) { - if (!in_array($capability, $rule_capabilities)) { - $is_active = false; - } - } - } - - $description = $rule->getDescription(); - - if (!$is_active) { - $description = phutil_tag( - 'span', - array( - 'class' => 'phui-policy-section-view-inactive-rule', - ), - $description); - } - - $exceptions[] = $description; - } - } else if (method_exists($object, 'describeAutomaticCapability')) { - $exceptions = (array)$object->describeAutomaticCapability($capability); - $exceptions = array_filter($exceptions); - } else { - $exceptions = array(); - } + $exceptions = PhabricatorPolicy::getSpecialRules( + $object, + $viewer, + $capability, + false); if (!$exceptions) { return null; } - return id(new PHUIPolicySectionView()) ->setViewer($viewer) ->setIcon('fa-unlock-alt red') diff --git a/src/applications/policy/filter/PhabricatorPolicyFilter.php b/src/applications/policy/filter/PhabricatorPolicyFilter.php index c3ac7fc016..1466d4e569 100644 --- a/src/applications/policy/filter/PhabricatorPolicyFilter.php +++ b/src/applications/policy/filter/PhabricatorPolicyFilter.php @@ -581,9 +581,16 @@ final class PhabricatorPolicyFilter extends Phobject { } $more = PhabricatorPolicy::getPolicyExplanation($this->viewer, $policy); - $exceptions = $object->describeAutomaticCapability($capability); + $more = (array)$more; + $more = array_filter($more); - $details = array_filter(array_merge(array($more), (array)$exceptions)); + $exceptions = PhabricatorPolicy::getSpecialRules( + $object, + $this->viewer, + $capability, + true); + + $details = array_filter(array_merge($more, $exceptions)); $access_denied = $this->renderAccessDenied($object); diff --git a/src/applications/policy/storage/PhabricatorPolicy.php b/src/applications/policy/storage/PhabricatorPolicy.php index a7426ccad6..68462cbc19 100644 --- a/src/applications/policy/storage/PhabricatorPolicy.php +++ b/src/applications/policy/storage/PhabricatorPolicy.php @@ -422,6 +422,54 @@ final class PhabricatorPolicy return ($this_strength > $other_strength); } + public static function getSpecialRules( + PhabricatorPolicyInterface $object, + PhabricatorUser $viewer, + $capability, + $active_only) { + + if ($object instanceof PhabricatorPolicyCodexInterface) { + $codex = PhabricatorPolicyCodex::newFromObject($object, $viewer); + $rules = $codex->getPolicySpecialRuleDescriptions(); + + $exceptions = array(); + foreach ($rules as $rule) { + $is_active = $rule->getIsActive(); + if ($is_active) { + $rule_capabilities = $rule->getCapabilities(); + if ($rule_capabilities) { + if (!in_array($capability, $rule_capabilities)) { + $is_active = false; + } + } + } + + if (!$is_active && $active_only) { + continue; + } + + $description = $rule->getDescription(); + + if (!$is_active) { + $description = phutil_tag( + 'span', + array( + 'class' => 'phui-policy-section-view-inactive-rule', + ), + $description); + } + + $exceptions[] = $description; + } + } else if (method_exists($object, 'describeAutomaticCapability')) { + $exceptions = (array)$object->describeAutomaticCapability($capability); + $exceptions = array_filter($exceptions); + } else { + $exceptions = array(); + } + + return $exceptions; + } /* -( PhabricatorPolicyInterface )----------------------------------------- */ @@ -444,10 +492,6 @@ final class PhabricatorPolicy return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorDestructibleInterface )----------------------------------- */ diff --git a/src/applications/project/storage/PhabricatorProjectColumnPosition.php b/src/applications/project/storage/PhabricatorProjectColumnPosition.php index 40929606ac..0bd9be6d4a 100644 --- a/src/applications/project/storage/PhabricatorProjectColumnPosition.php +++ b/src/applications/project/storage/PhabricatorProjectColumnPosition.php @@ -87,8 +87,4 @@ final class PhabricatorProjectColumnPosition extends PhabricatorProjectDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/releeph/storage/ReleephProject.php b/src/applications/releeph/storage/ReleephProject.php index cf5e179abf..bda0d0372d 100644 --- a/src/applications/releeph/storage/ReleephProject.php +++ b/src/applications/releeph/storage/ReleephProject.php @@ -153,9 +153,4 @@ final class ReleephProject extends ReleephDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - - } diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index c27f562864..d38eda1860 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -2330,11 +2330,6 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - - /* -( PhabricatorMarkupInterface )----------------------------------------- */ diff --git a/src/applications/repository/storage/PhabricatorRepositoryCommitHint.php b/src/applications/repository/storage/PhabricatorRepositoryCommitHint.php index e8594a1496..0a8e259dfe 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryCommitHint.php +++ b/src/applications/repository/storage/PhabricatorRepositoryCommitHint.php @@ -130,8 +130,4 @@ final class PhabricatorRepositoryCommitHint return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/repository/storage/PhabricatorRepositoryGitLFSRef.php b/src/applications/repository/storage/PhabricatorRepositoryGitLFSRef.php index 507af99cb4..6e55c03891 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryGitLFSRef.php +++ b/src/applications/repository/storage/PhabricatorRepositoryGitLFSRef.php @@ -45,10 +45,6 @@ final class PhabricatorRepositoryGitLFSRef return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorDestructibleInterface )----------------------------------- */ diff --git a/src/applications/repository/storage/PhabricatorRepositoryOldRef.php b/src/applications/repository/storage/PhabricatorRepositoryOldRef.php index 65cba3c48b..12763a42fe 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryOldRef.php +++ b/src/applications/repository/storage/PhabricatorRepositoryOldRef.php @@ -45,8 +45,4 @@ final class PhabricatorRepositoryOldRef return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/repository/storage/PhabricatorRepositoryURI.php b/src/applications/repository/storage/PhabricatorRepositoryURI.php index 15e25205c8..2f2815da1c 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryURI.php +++ b/src/applications/repository/storage/PhabricatorRepositoryURI.php @@ -642,10 +642,6 @@ final class PhabricatorRepositoryURI return false; } - public function describeAutomaticCapability($capability) { - return null; - } - /* -( PhabricatorExtendedPolicyInterface )--------------------------------- */ diff --git a/src/applications/search/storage/PhabricatorProfilePanelConfiguration.php b/src/applications/search/storage/PhabricatorProfilePanelConfiguration.php index d6f70e802e..6946026d8b 100644 --- a/src/applications/search/storage/PhabricatorProfilePanelConfiguration.php +++ b/src/applications/search/storage/PhabricatorProfilePanelConfiguration.php @@ -162,11 +162,6 @@ final class PhabricatorProfilePanelConfiguration } - public function describeAutomaticCapability($capability) { - return null; - } - - /* -( PhabricatorExtendedPolicyInterface )--------------------------------- */ diff --git a/src/applications/search/storage/PhabricatorSavedQuery.php b/src/applications/search/storage/PhabricatorSavedQuery.php index 8d3435f8b4..5bc8a95915 100644 --- a/src/applications/search/storage/PhabricatorSavedQuery.php +++ b/src/applications/search/storage/PhabricatorSavedQuery.php @@ -81,8 +81,4 @@ final class PhabricatorSavedQuery extends PhabricatorSearchDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - } diff --git a/src/applications/settings/storage/PhabricatorUserPreferences.php b/src/applications/settings/storage/PhabricatorUserPreferences.php index 5ed360ca2c..847836b284 100644 --- a/src/applications/settings/storage/PhabricatorUserPreferences.php +++ b/src/applications/settings/storage/PhabricatorUserPreferences.php @@ -222,11 +222,6 @@ final class PhabricatorUserPreferences return false; } - public function describeAutomaticCapability($capability) { - return null; - } - - /* -( PhabricatorDestructibleInterface )----------------------------------- */ diff --git a/src/applications/spaces/storage/PhabricatorSpacesNamespace.php b/src/applications/spaces/storage/PhabricatorSpacesNamespace.php index f728d22dfa..5f01376840 100644 --- a/src/applications/spaces/storage/PhabricatorSpacesNamespace.php +++ b/src/applications/spaces/storage/PhabricatorSpacesNamespace.php @@ -84,11 +84,6 @@ final class PhabricatorSpacesNamespace return false; } - public function describeAutomaticCapability($capability) { - return null; - } - - /* -( PhabricatorApplicationTransactionInterface )------------------------- */ diff --git a/src/applications/tokens/storage/PhabricatorToken.php b/src/applications/tokens/storage/PhabricatorToken.php index 0beeba3b81..a1f156611e 100644 --- a/src/applications/tokens/storage/PhabricatorToken.php +++ b/src/applications/tokens/storage/PhabricatorToken.php @@ -28,10 +28,6 @@ final class PhabricatorToken extends PhabricatorTokenDAO return false; } - public function describeAutomaticCapability($capability) { - return null; - } - public function renderIcon() { // TODO: Maybe move to a View class? diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php index 2a84d68775..f45da8d148 100644 --- a/src/applications/transactions/editengine/PhabricatorEditEngine.php +++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php @@ -2275,7 +2275,4 @@ abstract class PhabricatorEditEngine return false; } - public function describeAutomaticCapability($capability) { - return null; - } } diff --git a/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php b/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php index e169171f98..fc778c65b7 100644 --- a/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php +++ b/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php @@ -302,11 +302,6 @@ final class PhabricatorEditEngineConfiguration return false; } - public function describeAutomaticCapability($capability) { - return null; - } - - /* -( PhabricatorApplicationTransactionInterface )------------------------- */ diff --git a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php index c4104a5c6e..7b9a24d7e0 100644 --- a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php +++ b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php @@ -190,8 +190,4 @@ final class PhabricatorWorkerTrigger return true; } - public function describeAutomaticCapability($capability) { - return null; - } - }