Skip to content
Snippets Groups Projects
Commit 5acf7909 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #13747 TIME 2:45 add token auth in java applet (/!\ signed with 1.7 version! )

parent 0a70b579
No related branches found
No related tags found
No related merge requests found
Showing
with 10 additions and 2 deletions
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -144,6 +144,7 @@ class JnlpController
$tagArg10 = $jnlpDocument->createElement('argument', 'false'); //ConvertPdf //Useless
$tagArg11 = $jnlpDocument->createElement('argument', 'false'); //OnlyConvert //Useless
$tagArg12 = $jnlpDocument->createElement('argument', 0); //HashFile //Useless
$tagArg13 = $jnlpDocument->createElement('argument', $body['authToken']); //Token authentication
$tagJnlp->appendChild($tagInformation);
......@@ -177,6 +178,7 @@ class JnlpController
$tagApplication->appendChild($tagArg10);
$tagApplication->appendChild($tagArg11);
$tagApplication->appendChild($tagArg12);
$tagApplication->appendChild($tagArg13);
$jnlpDocument->appendChild($tagJnlp);
......
......@@ -14,6 +14,7 @@ import { TemplateFileEditorModalComponent } from './templateFileEditorModal/temp
import { DomSanitizer } from '@angular/platform-browser';
import { AlertComponent } from '../../../plugins/modal/alert.component';
import { MaarchFlatTreeComponent } from '../../../plugins/tree/maarch-flat-tree.component';
import { AuthService } from '@service/auth.service';
declare var tinymce: any;
......@@ -99,7 +100,8 @@ export class TemplateAdministrationComponent implements OnInit, OnDestroy {
public appService: AppService,
private viewContainerRef: ViewContainerRef,
public functionsService: FunctionsService,
public translate: TranslateService
public translate: TranslateService,
private authService: AuthService
) { }
ngOnInit(): void {
......@@ -377,7 +379,7 @@ export class TemplateAdministrationComponent implements OnInit, OnDestroy {
editorOptions.objectType = 'templateModification';
editorOptions.objectId = this.template.id;
}
editorOptions.authToken = this.authService.getToken(),
this.launchJavaEditor(editorOptions);
} else if (this.headerService.user.preferences.documentEdition !== 'java') {
this.launchIntegratedEditor(editorOptions, this.headerService.user.preferences.documentEdition);
......
......@@ -18,6 +18,7 @@ import { PrivilegeService } from '@service/privileges.service';
import { VisaWorkflowModalComponent } from '../visa/modal/visa-workflow-modal.component';
import { of } from 'rxjs';
import { CollaboraOnlineViewerComponent } from '../../plugins/collabora-online/collabora-online-viewer.component';
import { AuthService } from '@service/auth.service';
@Component({
selector: 'app-document-viewer',
......@@ -150,6 +151,7 @@ export class DocumentViewerComponent implements OnInit, OnDestroy {
private sortPipe: SortPipe,
public functions: FunctionsService,
public privilegeService: PrivilegeService,
private authService: AuthService
) {
(<any>window).pdfWorkerSrc = '../node_modules/pdfjs-dist/build/pdf.worker.min.js';
}
......@@ -753,6 +755,7 @@ export class DocumentViewerComponent implements OnInit, OnDestroy {
objectType: 'attachmentCreation',
objectId: template.id,
cookie: document.cookie,
authToken : this.authService.getToken(),
data: this.resourceDatas,
};
this.editInProgress = true;
......@@ -809,6 +812,7 @@ export class DocumentViewerComponent implements OnInit, OnDestroy {
objectType: 'attachmentModification',
objectId: this.resId,
cookie: document.cookie,
authToken : this.authService.getToken(),
data: this.resourceDatas,
};
this.editInProgress = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment