[ACA-2212] allow "edit in office" only for basic auth (#971)

* allow AOS only for basic auth for now

* bump aos extension version
This commit is contained in:
Denys Vuika
2019-02-25 16:06:17 +00:00
committed by GitHub
parent 7ad12f832a
commit 9458ce1785
4 changed files with 14 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@alfresco/adf-office-services-ext",
"version": "0.0.4",
"version": "0.0.5",
"license": "Apache-2.0",
"author": {
"name": "Keensoft",

View File

@@ -1,10 +1,17 @@
import { RuleContext, RuleParameter } from '@alfresco/adf-extensions';
import { AuthenticationService } from '@alfresco/adf-core';
import { getFileExtension, supportedExtensions } from './utils';
export function canOpenWithOffice(
context: RuleContext,
...args: RuleParameter[]
): boolean {
// todo: needs to have typed access via SDK (1.8)
const auth: AuthenticationService = (<any>context).auth;
if (auth && auth.isOauth()) {
return false;
}
const file = context.selection.file;
if (!file || !file.entry || !file.entry.properties) {