Skip to content

Commit 858c856

Browse files
committed
docs(oauth): add link to oauth documentation
Signed-off-by: Daniel Kesselberg <[email protected]>
1 parent 4e9bf84 commit 858c856

2 files changed

Lines changed: 16 additions & 23 deletions

File tree

lib/Settings/AdminSettings.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use OCA\Mail\Service\Classification\ClassificationSettingsService;
1818
use OCA\Mail\Service\Provisioning\Manager as ProvisioningManager;
1919
use OCP\AppFramework\Http\TemplateResponse;
20+
use OCP\Defaults;
2021
use OCP\IConfig;
2122
use OCP\IInitialStateService;
2223
use OCP\LDAP\ILDAPProvider;
@@ -40,14 +41,17 @@ class AdminSettings implements ISettings {
4041
private AiIntegrationsService $aiIntegrationsService;
4142
private ClassificationSettingsService $classificationSettingsService;
4243

43-
public function __construct(IInitialStateService $initialStateService,
44+
public function __construct(
45+
IInitialStateService $initialStateService,
4446
ProvisioningManager $provisioningManager,
4547
AntiSpamService $antiSpamService,
4648
GoogleIntegration $googleIntegration,
4749
MicrosoftIntegration $microsoftIntegration,
4850
IConfig $config,
4951
AiIntegrationsService $aiIntegrationsService,
50-
ClassificationSettingsService $classificationSettingsService) {
52+
ClassificationSettingsService $classificationSettingsService,
53+
private Defaults $themingDefaults,
54+
) {
5155
$this->initialStateService = $initialStateService;
5256
$this->provisioningManager = $provisioningManager;
5357
$this->antiSpamService = $antiSpamService;
@@ -138,6 +142,11 @@ static function () {
138142
'microsoft_oauth_redirect_url',
139143
$this->microsoftIntegration->getRedirectUrl(),
140144
);
145+
$this->initialStateService->provideInitialState(
146+
Application::APP_ID,
147+
'microsoft_oauth_docs',
148+
$this->themingDefaults->buildDocLinkToKey('admin-groupware-oauth-microsoft'),
149+
);
141150

142151
$this->initialStateService->provideInitialState(
143152
Application::APP_ID,

src/components/settings/AdminSettings.vue

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -223,33 +223,16 @@
223223
</div>
224224
<div class="app-description">
225225
<h3>
226-
{{
227-
t(
228-
'mail',
229-
'Microsoft integration'
230-
)
231-
}}
226+
{{ t('mail', 'Microsoft integration') }}
232227
</h3>
233228
<article>
234229
<p>
235-
{{
236-
t(
237-
'mail',
238-
'Microsoft allows users to access their email via IMAP. For security reasons this access is only possible with an OAuth 2.0 connection.'
239-
)
240-
}}
230+
{{ t('mail', 'Microsoft requires you to access your emails via IMAP using OAuth 2.0 authentication. To do this, you need to register an app with Microsoft Entra ID, formerly known as Microsoft Azure Active Directory.') }}
241231
</p>
242232
<p>
243-
{{
244-
t(
245-
'mail',
246-
'You have to register a new app in the Microsoft Azure Active Directory portal. Add the URL {url} as redirect URI.',
247-
{
248-
url: microsoftOauthRedirectUrl,
249-
}
250-
)
251-
}}
233+
{{ t('mail', 'Redirect URI') }}: <code>{{ microsoftOauthRedirectUrl }}</code>
252234
</p>
235+
<a :href="microsoftOauthDocs" target="_blank" rel="noopener noreferrer">{{ t('mail', 'For more details, please click here to open our documentation.') }}</a>
253236
</article>
254237
<MicrosoftAdminOauthSettings :tenant-id="microsoftOauthTenantId" :client-id="microsoftOauthClientId" />
255238
</div>
@@ -345,6 +328,7 @@ export default {
345328
googleOauthRedirectUrl,
346329
microsoftOauthTenantId,
347330
microsoftOauthClientId,
331+
microsoftOauthDocs: loadState('mail', 'microsoft_oauth_docs'),
348332
microsoftOauthRedirectUrl,
349333
preview: {
350334
provisioningDomain: '',

0 commit comments

Comments
 (0)