Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/provider/PhabricatorLDAPAuthProvider.php
<?php | <?php | ||||
final class PhabricatorLDAPAuthProvider extends PhabricatorAuthProvider { | final class PhabricatorLDAPAuthProvider extends PhabricatorAuthProvider { | ||||
private $adapter; | private $adapter; | ||||
public function getProviderName() { | public function getProviderName() { | ||||
return pht('LDAP'); | return pht('LDAP'); | ||||
} | } | ||||
public function getDescriptionForCreate() { | public function getDescriptionForCreate() { | ||||
return pht( | return pht( | ||||
'Configure a connection to an LDAP server so that users can use their '. | 'Configure a connection to an LDAP server so that users can use their '. | ||||
'LDAP credentials to log in to Phabricator.'); | 'LDAP credentials to log in.'); | ||||
epriestley: Maybe just "...to log in.", I think it's likely obvious from context. | |||||
} | } | ||||
public function getDefaultProviderConfig() { | public function getDefaultProviderConfig() { | ||||
return parent::getDefaultProviderConfig() | return parent::getDefaultProviderConfig() | ||||
->setProperty(self::KEY_PORT, 389) | ->setProperty(self::KEY_PORT, 389) | ||||
->setProperty(self::KEY_VERSION, 3); | ->setProperty(self::KEY_VERSION, 3); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 284 Lines • ▼ Show 20 Lines | $types = array( | ||||
self::KEY_SEARCH_ATTRIBUTES => 'textarea', | self::KEY_SEARCH_ATTRIBUTES => 'textarea', | ||||
self::KEY_REALNAME_ATTRIBUTES => 'list', | self::KEY_REALNAME_ATTRIBUTES => 'list', | ||||
self::KEY_ANONYMOUS_PASSWORD => 'password', | self::KEY_ANONYMOUS_PASSWORD => 'password', | ||||
self::KEY_ALWAYS_SEARCH => 'checkbox', | self::KEY_ALWAYS_SEARCH => 'checkbox', | ||||
); | ); | ||||
$instructions = array( | $instructions = array( | ||||
self::KEY_SEARCH_ATTRIBUTES => pht( | self::KEY_SEARCH_ATTRIBUTES => pht( | ||||
"When a user types their LDAP username and password into Phabricator, ". | "When a user provides their LDAP username and password to this ". | ||||
"Phabricator can either bind to LDAP with those credentials directly ". | "installation, it can either bind to LDAP directly using those ". | ||||
"(which is simpler, but not as powerful) or bind to LDAP with ". | "credentials (which is simpler, but not as powerful) or it can bind ". | ||||
"anonymous credentials, then search for record matching the supplied ". | "to LDAP with anonymous credentials, then search for a record ". | ||||
"credentials (which is more complicated, but more powerful).\n\n". | "matching the supplied credentials (which is more complicated, but ". | ||||
"For many installs, direct binding is sufficient. However, you may ". | "also more powerful).\n\n". | ||||
"want to search first if:\n\n". | "For many installations, direct binding is sufficient. However, you ". | ||||
"may want to search first if:\n\n". | |||||
" - You want users to be able to log in with either their username ". | " - You want users to be able to log in with either their username ". | ||||
" or their email address.\n". | " or their email address.\n". | ||||
" - The login/username is not part of the distinguished name in ". | " - The login/username is not part of the distinguished name in ". | ||||
" your LDAP records.\n". | " your LDAP records.\n". | ||||
" - You want to restrict logins to a subset of users (like only ". | " - You want to restrict logins to a subset of users (like only ". | ||||
" those in certain departments).\n". | " those in certain departments).\n". | ||||
" - Your LDAP server is configured in some other way that prevents ". | " - Your LDAP server is configured in some other way that prevents ". | ||||
" direct binding from working correctly.\n\n". | " direct binding from working correctly.\n\n". | ||||
▲ Show 20 Lines • Show All 167 Lines • Show Last 20 Lines |
Maybe just "...to log in.", I think it's likely obvious from context.