авторизация включена

This commit is contained in:
gorbenko.pavel
2026-07-29 16:45:28 +05:00
parent bfa0777739
commit 61c7f7dd71
2 changed files with 5 additions and 2 deletions
@@ -23,7 +23,7 @@
"officeFabricIconFontName": "Page", "officeFabricIconFontName": "Page",
"properties": { "properties": {
"apiBaseUrl": "http://localhost:5080", "apiBaseUrl": "http://localhost:5080",
"useDevAuth": true, "useDevAuth": false,
"devUserEmail": "dev@tnsu.kz", "devUserEmail": "dev@tnsu.kz",
"aadResourceId": "api://9232d9e2-9807-4753-808f-07250e5474b0", "aadResourceId": "api://9232d9e2-9807-4753-808f-07250e5474b0",
"portalBaseUrl": "https://api.tnsu.kz" "portalBaseUrl": "https://api.tnsu.kz"
@@ -36,7 +36,10 @@ export default class ApprovalAdminWebPart extends BaseClientSideWebPart<IApprova
protected onInit(): Promise<void> { protected onInit(): Promise<void> {
this.properties.apiBaseUrl = this.properties.apiBaseUrl || 'http://localhost:5080'; this.properties.apiBaseUrl = this.properties.apiBaseUrl || 'http://localhost:5080';
this.properties.useDevAuth = this.properties.useDevAuth ?? true; // Dev-режим ломает /resolve: наш бэкенд не получает Bearer-токен пользователя
// для пересылки в api.tnsu.kz и падает на собственном client_credentials
// (TnsuPortal:ClientSecret в appsettings.json пуст). По умолчанию — реальный AAD.
this.properties.useDevAuth = this.properties.useDevAuth ?? false;
this.properties.devUserEmail = this.properties.devUserEmail || 'dev@tnsu.kz'; this.properties.devUserEmail = this.properties.devUserEmail || 'dev@tnsu.kz';
this.properties.aadResourceId = this.properties.aadResourceId || 'api://9232d9e2-9807-4753-808f-07250e5474b0'; this.properties.aadResourceId = this.properties.aadResourceId || 'api://9232d9e2-9807-4753-808f-07250e5474b0';
this.properties.portalBaseUrl = this.properties.portalBaseUrl || 'https://api.tnsu.kz'; this.properties.portalBaseUrl = this.properties.portalBaseUrl || 'https://api.tnsu.kz';