mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 00:02:41 +01:00
3ded757e84
Summary: Allow extra options to be locked, hidden or masked via config. These options are themselves locked and can not be edited via the web UI. The primary goal here is to let us lock or hide things from SaaS installs (e.g., keys, etc.), or to let server administrators lock or hide information from web UI administrators if they want to for some reason. The secondary goal is to remove the `darkconsole.config-mask` option, although I might just remove the panel entirely and put it in the config app, since that probably makes far more sense. Yeahhhhh... probably doing that. These options need masks when ported (they haven't been ported yet): phabricator.csrf-key phabricator.mail-key security.hmac-key Test Plan: Artifically tweaked lock/hide settings on options, verified the UI respected them. Reviewers: codeblock, btrahan Reviewed By: codeblock CC: aran Maniphest Tasks: T2255 Differential Revision: https://secure.phabricator.com/D4472
57 lines
1.7 KiB
PHP
57 lines
1.7 KiB
PHP
<?php
|
|
|
|
final class PhabricatorGoogleConfigOptions
|
|
extends PhabricatorApplicationConfigOptions {
|
|
|
|
public function getName() {
|
|
return pht("Integration with Google");
|
|
}
|
|
|
|
public function getDescription() {
|
|
return pht("Google authentication and integration options.");
|
|
}
|
|
|
|
public function getOptions() {
|
|
return array(
|
|
$this->newOption('google.auth-enabled', 'bool', false)
|
|
->setBoolOptions(
|
|
array(
|
|
pht("Enable Google Authentication"),
|
|
pht("Disable Google Authentication"),
|
|
))
|
|
->setDescription(
|
|
pht(
|
|
'Allow users to login to Phabricator using Google credentials.')),
|
|
$this->newOption('google.registration-enabled', 'bool', true)
|
|
->setBoolOptions(
|
|
array(
|
|
pht("Enable Google Registration"),
|
|
pht("Disable Google Registration"),
|
|
))
|
|
->setDescription(
|
|
pht(
|
|
'Allow users to create new Phabricator accounts using Google '.
|
|
'credentials.')),
|
|
$this->newOption('google.auth-permanent', 'bool', false)
|
|
->setBoolOptions(
|
|
array(
|
|
pht("Permanently Bind Google Accounts"),
|
|
pht("Allow Google Account Unlinking"),
|
|
))
|
|
->setDescription(
|
|
pht(
|
|
'Are Phabricator accounts permanently bound to Google '.
|
|
'accounts?')),
|
|
$this->newOption('google.application-id', 'string', null)
|
|
->setDescription(
|
|
pht(
|
|
'Google "Client ID" to use for Google API access.')),
|
|
$this->newOption('google.application-secret', 'string', null)
|
|
->setMasked(true)
|
|
->setDescription(
|
|
pht(
|
|
'Google "Secret" to use for Google API access.')),
|
|
);
|
|
}
|
|
|
|
}
|