Allow customer directlogin text

Some people seem to want to have a custom direct login text. This allows
them to set it. For now only via occ. But maybe some day we also add a
GUI component to it.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2021-01-12 14:44:05 +01:00
parent 425ef9c6c6
commit 7f7def4b7f
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -492,9 +492,16 @@ class SAMLController extends Controller {
$attributes = ['loginUrls' => []];
if ($this->SAMLSettings->allowMultipleUserBackEnds()) {
$displayName = $this->l->t('Direct log in');
$customDisplayName = $this->config->getAppValue('user_saml', 'directLoginName', '');
if ($customDisplayName !== '') {
$displayName = $customDisplayName;
}
$attributes['loginUrls']['directLogin'] = [
'url' => $this->getDirectLoginUrl($redirectUrl),
'display-name' => $this->l->t('Direct log in')
'display-name' => $displayName,
];
}