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) {
|
||||
|
@@ -24,7 +24,9 @@
|
||||
*/
|
||||
|
||||
import { RuleContext, RepositoryState } from '@alfresco/adf-extensions';
|
||||
import { AuthenticationService } from '@alfresco/adf-core';
|
||||
|
||||
export interface AppRuleContext extends RuleContext {
|
||||
repository: RepositoryState;
|
||||
auth: AuthenticationService;
|
||||
}
|
||||
|
@@ -35,7 +35,6 @@ import {
|
||||
SelectionState,
|
||||
NavigationState,
|
||||
ExtensionConfig,
|
||||
RuleContext,
|
||||
RuleEvaluator,
|
||||
ViewerExtensionRef,
|
||||
ContentActionRef,
|
||||
@@ -52,15 +51,16 @@ import {
|
||||
RepositoryState,
|
||||
ExtensionRef
|
||||
} from '@alfresco/adf-extensions';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
import { AppConfigService, AuthenticationService } from '@alfresco/adf-core';
|
||||
import { DocumentListPresetRef } from './document-list.extensions';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { IconRef } from './icon.extensions';
|
||||
import { AppRuleContext } from './app.interface';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AppExtensionService implements RuleContext {
|
||||
export class AppExtensionService implements AppRuleContext {
|
||||
private _references = new BehaviorSubject<ExtensionRef[]>([]);
|
||||
|
||||
defaults = {
|
||||
@@ -108,6 +108,7 @@ export class AppExtensionService implements RuleContext {
|
||||
references$: Observable<ExtensionRef[]>;
|
||||
|
||||
constructor(
|
||||
public auth: AuthenticationService,
|
||||
protected store: Store<AppStore>,
|
||||
protected loader: ExtensionLoaderService,
|
||||
protected extensions: ExtensionService,
|
||||
|
Reference in New Issue
Block a user