feat(apps): добавить MikrotikManager app id mm
quality / commitlint (push) Skipped
quality / changes (push) Successful in 7s
quality / docker-check (push) Skipped
quality / web (push) Successful in 40s
quality / api (push) Successful in 36s
CD / quality (push) Successful in 1m37s
CD / publish (push) Successful in 1m40s

Регистрация mm в каталоге приложений, permissions mm:*, target-app и docs.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-09-04 20:38:27 +07:00
co-authored by Cursor
parent 01d3a79e13
commit fd7d9fd13c
13 changed files with 166 additions and 4 deletions
+7
View File
@@ -58,6 +58,13 @@ export function targetAppFromReturnTo(
) {
return 'cdn'
}
if (
/\bmm\b/.test(hay) ||
host.includes('mikrotik') ||
host.includes('mmapp')
) {
return 'mm'
}
return 'portal'
}
+4
View File
@@ -22,11 +22,15 @@ describe('app-switcher API', () => {
'cfdm',
'dns',
'fw',
'mm',
'vps',
])
expect(body.apps.find((a) => a.id === 'cdn')).toMatchObject({
authMode: 'jwt',
})
expect(body.apps.find((a) => a.id === 'mm')).toMatchObject({
authMode: 'jwt',
})
expect(body.apps.find((a) => a.id === 'dns')).toMatchObject({
authMode: 'oidc',
})
+6
View File
@@ -27,4 +27,10 @@ describe('targetAppFromReturnTo', () => {
'cdn',
)
})
it('maps mm host', () => {
expect(targetAppFromReturnTo('https://mm.shnt.top/auth/callback')).toBe(
'mm',
)
})
})