mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[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:
@@ -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",
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user