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

Move the Git LFS gate to dedicated (non-prototype) config

Summary: See PHI131. Ref T7789. Although this probably isn't 100% complete, there don't seem to be any actual, known, practical blocking issues remaining (everything is either heresay or not reproducible).

Test Plan: Tried to push LFS locally, got blocked with a helpful message. Enabled setting, tried to push LFS locally, got a successful push.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T7789

Differential Revision: https://secure.phabricator.com/D18825
This commit is contained in:
epriestley 2017-12-13 05:35:56 -08:00
parent c9a0d68340
commit e34b4bbd90
2 changed files with 15 additions and 3 deletions

View file

@ -101,7 +101,7 @@ final class PhabricatorDiffusionConfigOptions
->setBoolOptions( ->setBoolOptions(
array( array(
pht('Allow HTTP Basic Auth'), pht('Allow HTTP Basic Auth'),
pht('Disable HTTP Basic Auth'), pht('Disallow HTTP Basic Auth'),
)) ))
->setSummary(pht('Enable HTTP Basic Auth for repositories.')) ->setSummary(pht('Enable HTTP Basic Auth for repositories.'))
->setDescription( ->setDescription(
@ -115,6 +115,19 @@ final class PhabricatorDiffusionConfigOptions
"barrier to attackers than SSH does.\n\n". "barrier to attackers than SSH does.\n\n".
"Consider using SSH for authenticated access to repositories ". "Consider using SSH for authenticated access to repositories ".
"instead of HTTP.")), "instead of HTTP.")),
$this->newOption('diffusion.allow-git-lfs', 'bool', false)
->setBoolOptions(
array(
pht('Allow Git LFS'),
pht('Disallow Git LFS'),
))
->setLocked(true)
->setSummary(pht('Allow Git Large File Storage (LFS).'))
->setDescription(
pht(
'Phabricator supports Git LFS, a Git extension for storing large '.
'files alongside a repository. Activate this setting to allow '.
'the extension to store file data in Phabricator.')),
$this->newOption('diffusion.ssh-user', 'string', null) $this->newOption('diffusion.ssh-user', 'string', null)
->setLocked(true) ->setLocked(true)
->setSummary(pht('Login username for SSH connections to repositories.')) ->setSummary(pht('Login username for SSH connections to repositories.'))

View file

@ -1627,8 +1627,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
return false; return false;
} }
// TODO: Unprototype this feature. if (!PhabricatorEnv::getEnvConfig('diffusion.allow-git-lfs')) {
if (!PhabricatorEnv::getEnvConfig('phabricator.show-prototypes')) {
return false; return false;
} }