mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-2257] Remove locking when open with MS Office because the AOS Amp is handling the locking on his own. (#1053)
This commit is contained in:
@@ -2,8 +2,7 @@
|
|||||||
import {
|
import {
|
||||||
AppConfigService,
|
AppConfigService,
|
||||||
AuthenticationService,
|
AuthenticationService,
|
||||||
NotificationService,
|
NotificationService
|
||||||
AlfrescoApiService
|
|
||||||
} from '@alfresco/adf-core';
|
} from '@alfresco/adf-core';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
|
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
|
||||||
@@ -16,8 +15,7 @@ export class AosEditOnlineService {
|
|||||||
constructor(
|
constructor(
|
||||||
private alfrescoAuthenticationService: AuthenticationService,
|
private alfrescoAuthenticationService: AuthenticationService,
|
||||||
private appConfigService: AppConfigService,
|
private appConfigService: AppConfigService,
|
||||||
private notificationService: NotificationService,
|
private notificationService: NotificationService
|
||||||
private apiService: AlfrescoApiService
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
onActionEditOnlineAos(node: MinimalNodeEntryEntity): void {
|
onActionEditOnlineAos(node: MinimalNodeEntryEntity): void {
|
||||||
@@ -89,22 +87,7 @@ export class AosEditOnlineService {
|
|||||||
3000
|
3000
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.apiService.nodesApi
|
|
||||||
.lockNode(node.id, {
|
|
||||||
type: 'ALLOW_OWNER_CHANGES',
|
|
||||||
lifetime: 'PERSISTENT'
|
|
||||||
})
|
|
||||||
.then(
|
|
||||||
() => {
|
|
||||||
this.aos_tryToLaunchOfficeByMsProtocolHandler(protocolHandler, url);
|
this.aos_tryToLaunchOfficeByMsProtocolHandler(protocolHandler, url);
|
||||||
},
|
|
||||||
() => {
|
|
||||||
this.notificationService.openSnackMessage(
|
|
||||||
'Cannot lock the node for editing.',
|
|
||||||
3000
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user