Differential D21783 Diff 51939 src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | return array( | ||||
->setBoolOptions( | ->setBoolOptions( | ||||
array( | array( | ||||
pht('Allow HTTP Basic Auth'), | pht('Allow HTTP Basic Auth'), | ||||
pht('Disallow 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( | ||||
pht( | pht( | ||||
"Phabricator can serve repositories over HTTP, using HTTP basic ". | "This server can serve repositories over HTTP, using HTTP basic ". | ||||
"auth.\n\n". | "auth.\n\n". | ||||
"Because HTTP basic auth is less secure than SSH auth, it is ". | "Because HTTP basic auth is less secure than SSH auth, it is ". | ||||
"disabled by default. You can enable it here if you'd like to use ". | "disabled by default. You can enable it here if you'd like to use ". | ||||
"it anyway. There's nothing fundamentally insecure about it as ". | "it anyway. There's nothing fundamentally insecure about it as ". | ||||
"long as Phabricator uses HTTPS, but it presents a much lower ". | "long as this server uses HTTPS, but it presents a much lower ". | ||||
"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) | $this->newOption('diffusion.allow-git-lfs', 'bool', false) | ||||
->setBoolOptions( | ->setBoolOptions( | ||||
array( | array( | ||||
pht('Allow Git LFS'), | pht('Allow Git LFS'), | ||||
pht('Disallow Git LFS'), | pht('Disallow Git LFS'), | ||||
)) | )) | ||||
->setLocked(true) | ->setLocked(true) | ||||
->setSummary(pht('Allow Git Large File Storage (LFS).')) | ->setSummary(pht('Allow Git Large File Storage (LFS).')) | ||||
->setDescription( | ->setDescription( | ||||
pht( | pht( | ||||
'Phabricator supports Git LFS, a Git extension for storing large '. | 'This server supports Git LFS, a Git extension for storing large '. | ||||
'files alongside a repository. Activate this setting to allow '. | 'files alongside a repository. Activate this setting to allow '. | ||||
'the extension to store file data in Phabricator.')), | 'the extension to store file data.')), | ||||
$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.')) | ||||
->setDescription( | ->setDescription( | ||||
pht( | pht( | ||||
'When constructing clone URIs to show to users, Diffusion will '. | 'When constructing clone URIs to show to users, Diffusion will '. | ||||
'fill in this login username. If you have configured a VCS user '. | 'fill in this login username. If you have configured a VCS user '. | ||||
'like `git`, you should provide it here.')), | 'like `git`, you should provide it here.')), | ||||
$this->newOption('diffusion.ssh-port', 'int', null) | $this->newOption('diffusion.ssh-port', 'int', null) | ||||
->setLocked(true) | ->setLocked(true) | ||||
->setSummary(pht('Port for SSH connections to repositories.')) | ->setSummary(pht('Port for SSH connections to repositories.')) | ||||
->setDescription( | ->setDescription( | ||||
pht( | pht( | ||||
'When constructing clone URIs to show to users, Diffusion by '. | 'When constructing clone URIs to show to users, Diffusion by '. | ||||
'default will not display a port assuming the default for your '. | 'default will not display a port assuming the default for your '. | ||||
'VCS. Explicitly declare when running on a non-standard port.')), | 'VCS. Explicitly declare when running on a non-standard port.')), | ||||
$this->newOption('diffusion.ssh-host', 'string', null) | $this->newOption('diffusion.ssh-host', 'string', null) | ||||
->setLocked(true) | ->setLocked(true) | ||||
->setSummary(pht('Host for SSH connections to repositories.')) | ->setSummary(pht('Host for SSH connections to repositories.')) | ||||
->setDescription( | ->setDescription( | ||||
pht( | pht( | ||||
'If you accept Phabricator SSH traffic on a different host '. | 'If you accept SSH traffic on a different host from web traffic '. | ||||
'from web traffic (for example, if you use different SSH and '. | '(for example, if you use different SSH and web load balancers), '. | ||||
'web load balancers), you can set the SSH hostname here. This '. | 'you can set the SSH hostname here. This is an advanced option.')), | ||||
'is an advanced option.')), | |||||
$this->newOption('diffusion.fields', $custom_field_type, $default_fields) | $this->newOption('diffusion.fields', $custom_field_type, $default_fields) | ||||
->setCustomData( | ->setCustomData( | ||||
id(new PhabricatorRepositoryCommit()) | id(new PhabricatorRepositoryCommit()) | ||||
->getCustomFieldBaseClass()) | ->getCustomFieldBaseClass()) | ||||
->setDescription( | ->setDescription( | ||||
pht('Select and reorder Diffusion fields.')), | pht('Select and reorder Diffusion fields.')), | ||||
); | ); | ||||
} | } | ||||
} | } |