RED-6686 - do not merge
This commit is contained in:
parent
d66d548d42
commit
fe4e49751f
@ -5,6 +5,7 @@ import { ISmtpConfiguration } from '@red/domain';
|
||||
@Injectable()
|
||||
export class SmtpConfigService extends GenericService<unknown> {
|
||||
protected readonly _defaultModelPath = 'configuration';
|
||||
protected readonly _serviceName: string = 'tenant-user-management';
|
||||
|
||||
updateSMTPConfiguration(body: ISmtpConfiguration) {
|
||||
return this._post(body, `${this._defaultModelPath}/smtp`);
|
||||
|
||||
@ -35,9 +35,9 @@ export class FileDownloadService extends EntitiesService<IDownloadStatus, Downlo
|
||||
async performDownload(status: DownloadStatus) {
|
||||
const token = await this.generateToken(status.storageId);
|
||||
const anchor = document.createElement('a');
|
||||
anchor.href = `${this._configService.values.API_URL}/async/download/with-ott/${token.value}?tenantId=${encodeURIComponent(
|
||||
this._tenantsService.activeTenantId,
|
||||
)}`;
|
||||
anchor.href = `${this._configService.values.API_URL}/redaction-gateway-v1/async/download/with-ott/${
|
||||
token.value
|
||||
}?tenantId=${encodeURIComponent(this._tenantsService.activeTenantId)}`;
|
||||
anchor.download = status.filename;
|
||||
anchor.target = '_blank';
|
||||
this._logger.info('[DOWNLOAD] Downloading with link: ', anchor.href);
|
||||
|
||||
@ -175,7 +175,7 @@ export class FileUploadService extends GenericService<IFileUploadResult> impleme
|
||||
|
||||
const headers = HeadersConfiguration.getHeaders({ contentType: false }).append('ngsw-bypass', 'true');
|
||||
|
||||
return this._http.post<IFileUploadResult>(`/${this._defaultModelPath}/${dossierId}`, formParams, {
|
||||
return this._http.post<IFileUploadResult>(`/${this._serviceName}/${this._defaultModelPath}/${dossierId}`, formParams, {
|
||||
headers,
|
||||
observe: 'events',
|
||||
reportProgress: true,
|
||||
|
||||
@ -16,14 +16,14 @@ export class EntityPermissionsService extends GenericService<IPermissionsMapping
|
||||
readonly #permissionsMapService = inject(PermissionsMapService);
|
||||
|
||||
loadConfigFor(targetObject: string): Observable<PermissionsMapping[]> {
|
||||
return this._http.get<IPermissionsMapping[]>(`/${this._defaultModelPath}/${targetObject}/mapping`).pipe(
|
||||
return this._http.get<IPermissionsMapping[]>(`/${this._serviceName}/${this._defaultModelPath}/${targetObject}/mapping`).pipe(
|
||||
mapEach(mapping => new PermissionsMapping(mapping)),
|
||||
tap(mappings => this.#permissionsConfigurationMapService.set(targetObject, mappings)),
|
||||
);
|
||||
}
|
||||
|
||||
loadFor(targetObject: string): Observable<PermissionsMapping[]> {
|
||||
return this._http.get<IPermissionsMapping[]>(`/${this._defaultModelPath}/${targetObject}`).pipe(
|
||||
return this._http.get<IPermissionsMapping[]>(`/${this._serviceName}/${this._defaultModelPath}/${targetObject}`).pipe(
|
||||
mapEach(mapping => new PermissionsMapping(mapping)),
|
||||
tap(mappings => {
|
||||
this.#addMissingPermissions(mappings, targetObject);
|
||||
|
||||
@ -14,7 +14,7 @@ export class EarmarksService extends GenericService<EarmarkResponse> {
|
||||
readonly #toaster = inject(Toaster);
|
||||
|
||||
getEarmarks(dossierId: string, fileId: string) {
|
||||
const request = this._http.get<{ highlights: Earmark[] }>(`/${this.#getPath(dossierId, fileId)}`).pipe(
|
||||
const request = this._http.get<{ highlights: Earmark[] }>(`/${this._serviceName}/${this.#getPath(dossierId, fileId)}`).pipe(
|
||||
map(response => response.highlights),
|
||||
map(highlights => highlights.map(highlight => AnnotationWrapper.fromEarmark(highlight))),
|
||||
map(highlights => highlights.sort((h1, h2) => h1.color.localeCompare(h2.color))),
|
||||
@ -25,7 +25,7 @@ export class EarmarksService extends GenericService<EarmarkResponse> {
|
||||
}
|
||||
|
||||
performHighlightsAction(ids: string[], dossierId: string, fileId: string, operation: EarmarkOperation) {
|
||||
return this._post({ ids }, `${this.#getPath(dossierId, fileId)}/${operation}`).pipe(
|
||||
return this._post({ ids }, `/${this._serviceName}/${this.#getPath(dossierId, fileId)}/${operation}`).pipe(
|
||||
tap(() => this.#toaster.success(_('highlight-action-dialog.success'), { params: { operation } })),
|
||||
);
|
||||
}
|
||||
|
||||
@ -37,12 +37,16 @@ export class FileManagementService extends GenericService<unknown> {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
return this._http.request('get', `/download/original/${encodeURIComponent(dossierId)}/${encodeURIComponent(fileId)}`, {
|
||||
responseType: 'blob',
|
||||
params: this._queryParams(queryParams),
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: observe === 'events',
|
||||
});
|
||||
return this._http.request(
|
||||
'get',
|
||||
`/${this._serviceName}/download/original/${encodeURIComponent(dossierId)}/${encodeURIComponent(fileId)}`,
|
||||
{
|
||||
responseType: 'blob',
|
||||
params: this._queryParams(queryParams),
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: observe === 'events',
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ export class RedactionImportService extends GenericService<void> {
|
||||
|
||||
const headers = HeadersConfiguration.getHeaders({ contentType: false }).append('ngsw-bypass', 'true');
|
||||
|
||||
return this._http.post<void>(`/${this._defaultModelPath}/${dossierId}/${fileId}`, formParams, {
|
||||
return this._http.post<void>(`/${this._serviceName}/${this._defaultModelPath}/${dossierId}/${fileId}`, formParams, {
|
||||
headers,
|
||||
observe: 'response',
|
||||
});
|
||||
|
||||
@ -66,7 +66,7 @@ export class RssService extends GenericService<void> {
|
||||
let headers = new HttpHeaders();
|
||||
headers = headers.set('accept', 'application/xml');
|
||||
|
||||
return this._http.get(`/${encodeURI('rss')}/${entityPath}`, {
|
||||
return this._http.get(`/${this._serviceName}/${encodeURI('rss')}/${entityPath}`, {
|
||||
headers: headers,
|
||||
params: this._queryParams(queryParams),
|
||||
responseType: 'text',
|
||||
|
||||
@ -8,6 +8,7 @@ import { Observable } from 'rxjs';
|
||||
})
|
||||
export class GeneralSettingsService extends GenericService<IGeneralConfiguration> {
|
||||
protected readonly _defaultModelPath = 'configuration';
|
||||
protected readonly _serviceName: string = 'tenant-user-management';
|
||||
|
||||
getGeneralConfigurations(): Observable<IGeneralConfiguration> {
|
||||
return this._getOne(['general']);
|
||||
|
||||
@ -142,7 +142,7 @@ export class LicenseService extends GenericService<ILicenseReport> {
|
||||
}
|
||||
|
||||
async loadLicenses() {
|
||||
const licenses$ = this._http.get<ILicenses>('/license').pipe(catchError(() => of(defaultOnError)));
|
||||
const licenses$ = this._http.get<ILicenses>(`/${this._serviceName}/license`).pipe(catchError(() => of(defaultOnError)));
|
||||
const licenses = await firstValueFrom(licenses$);
|
||||
this.#licenseData$.next(licenses);
|
||||
this.setDefaultSelectedLicense();
|
||||
|
||||
@ -21,7 +21,7 @@ export class ReportTemplateService extends GenericService<unknown> {
|
||||
formParams.append('file', <any>file);
|
||||
}
|
||||
|
||||
return this._http.post(`/${this._defaultModelPath}/${dossierTemplateId}`, formParams, {
|
||||
return this._http.post(`/${this._serviceName}/${this._defaultModelPath}/${dossierTemplateId}`, formParams, {
|
||||
observe: 'body',
|
||||
});
|
||||
}
|
||||
@ -46,7 +46,7 @@ export class ReportTemplateService extends GenericService<unknown> {
|
||||
downloadReportTemplate(dossierTemplateId: string, templateId: string, observe: 'response'): Observable<HttpResponse<Blob>>;
|
||||
downloadReportTemplate(dossierTemplateId: string, templateId: string, observe: 'body'): Observable<Blob>;
|
||||
downloadReportTemplate(dossierTemplateId: string, templateId: string, observe: 'body' | 'response' = 'body') {
|
||||
return this._http.request('get', `/${this._defaultModelPath}/${dossierTemplateId}/${templateId}`, {
|
||||
return this._http.request('get', `/${this._serviceName}/${this._defaultModelPath}/${dossierTemplateId}/${templateId}`, {
|
||||
responseType: 'blob',
|
||||
observe: observe,
|
||||
headers: HeadersConfiguration.getHeaders({ contentType: false }),
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
export const Roles = {
|
||||
RED_CREATE_TENANT: 'red-create-tenant',
|
||||
RED_DEPLOYMENT_INFO: 'red-deployment-info',
|
||||
RED_GET_TENANTS: 'red-get-tenants',
|
||||
RED_CREATE_TENANT: 'fforesight-create-tenant',
|
||||
RED_DEPLOYMENT_INFO: 'fforesight-deployment-info',
|
||||
RED_GET_TENANTS: 'fforesight-get-tenants',
|
||||
RED_READ_VERSIONS: 'red-read-versions',
|
||||
RED_REINDEX: 'red-reindex',
|
||||
managePreferences: 'red-manage-user-preferences',
|
||||
updateMyProfile: 'red-update-my-profile',
|
||||
managePreferences: 'fforesight-manage-user-preferences',
|
||||
updateMyProfile: 'fforesight-update-my-profile',
|
||||
getRss: 'red-get-rss',
|
||||
excludeIncludeFile: 'red-exclude-include-file',
|
||||
excludeIncludePages: 'red-exclude-include-pages',
|
||||
@ -33,8 +33,8 @@ export const Roles = {
|
||||
delete: 'red-delete-comment',
|
||||
},
|
||||
smtp: {
|
||||
read: 'red-read-smtp-configuration',
|
||||
write: 'red-write-smtp-configuration',
|
||||
read: 'fforesight-read-smtp-configuration',
|
||||
write: 'fforesight-write-smtp-configuration',
|
||||
},
|
||||
license: {
|
||||
edit: 'red-update-license',
|
||||
@ -66,9 +66,9 @@ export const Roles = {
|
||||
read: 'red-read-watermark',
|
||||
},
|
||||
users: {
|
||||
write: 'red-write-users',
|
||||
read: 'red-read-users',
|
||||
readAll: 'red-read-all-users',
|
||||
write: 'fforesight-write-users',
|
||||
read: 'fforesight-read-users',
|
||||
readAll: 'fforesight-read-all-users',
|
||||
},
|
||||
dossiers: {
|
||||
read: 'red-read-dossier',
|
||||
@ -141,8 +141,8 @@ export const Roles = {
|
||||
write: 'red-write-app-configuration',
|
||||
},
|
||||
generalConfiguration: {
|
||||
read: 'red-read-general-configuration',
|
||||
write: 'red-write-general-configuration',
|
||||
read: 'fforesight-read-general-configuration',
|
||||
write: 'fforesight-write-general-configuration',
|
||||
},
|
||||
any: 'any',
|
||||
} as const;
|
||||
|
||||
@ -38,7 +38,7 @@ export class UserService extends IqserUserService<IIqserUser, User> {
|
||||
}
|
||||
|
||||
protected readonly _rolesFilter = (role: string) => role.startsWith('RED_');
|
||||
protected readonly _permissionsFilter = (role: string) => role.startsWith('red-');
|
||||
protected readonly _permissionsFilter = (role: string) => role.startsWith('red-') || role.startsWith('fforesight-');
|
||||
}
|
||||
|
||||
export function getCurrentUser() {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"ADMIN_CONTACT_NAME": null,
|
||||
"ADMIN_CONTACT_URL": null,
|
||||
"API_URL": "https://dev-08.iqser.cloud/redaction-gateway-v1",
|
||||
"API_URL": "https://dev-01.iqser.cloud",
|
||||
"APP_NAME": "RedactManager",
|
||||
"AUTO_READ_TIME": 3,
|
||||
"BACKEND_APP_VERSION": "4.4.40",
|
||||
@ -11,7 +11,7 @@
|
||||
"MAX_RETRIES_ON_SERVER_ERROR": 3,
|
||||
"OAUTH_CLIENT_ID": "redaction",
|
||||
"OAUTH_IDP_HINT": null,
|
||||
"OAUTH_URL": "https://dev-08.iqser.cloud/auth",
|
||||
"OAUTH_URL": "https://dev-01.iqser.cloud/auth",
|
||||
"RECENT_PERIOD_IN_HOURS": 24,
|
||||
"SELECTION_MODE": "structural",
|
||||
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
ADMIN_CONTACT_NAME="${ADMIN_CONTACT_NAME:-}"
|
||||
ADMIN_CONTACT_URL="${ADMIN_CONTACT_URL:-}"
|
||||
API_URL="${API_URL:-/redaction-gateway-v1}"
|
||||
API_URL="${API_URL:-}"
|
||||
APP_NAME="${APP_NAME:-}"
|
||||
AUTO_READ_TIME="${AUTO_READ_TIME:-1.5}"
|
||||
BACKEND_APP_VERSION="${BACKEND_APP_VERSION:-4.7.0}"
|
||||
|
||||
10
git-version.json
Normal file
10
git-version.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"dirty": true,
|
||||
"raw": "a84073b85-dirty",
|
||||
"hash": "a84073b85",
|
||||
"distance": null,
|
||||
"tag": null,
|
||||
"semver": null,
|
||||
"suffix": "a84073b85-dirty",
|
||||
"semverString": null
|
||||
}
|
||||
@ -1 +1 @@
|
||||
Subproject commit 75356e2328051f629ac1a860e55cba0c2a16a6d5
|
||||
Subproject commit f56838648d4b54861d48de47096395e498e337ea
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "redaction",
|
||||
"version": "4.134.0",
|
||||
"version": "5.0.0",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user