[ADF-4125] simplify extension load in extension module (#4214)

* add extension load in extension module

* add viewer extensions

* fix license header

* fix node passed in the viewer extension

* fix node passed in the viewer extension

* startup factory extension

* startup factory extension

* fix script

* fix beta tag build

* fix build

* fix build

* refactoring configuration files

* extension using map

* fix build

* fix config

* fix test

* fix test
This commit is contained in:
Eugenio Romano
2019-02-22 14:19:41 +00:00
committed by GitHub
parent bf4d1a2806
commit bda7e07b52
92 changed files with 1035 additions and 785 deletions

View File

@@ -17,7 +17,7 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ContentService, PermissionsEnum, NodesApiService } from '@alfresco/adf-core';
import { ContentService, AllowableOperationsEnum, PermissionsEnum, NodesApiService } from '@alfresco/adf-core';
import { MatSnackBar } from '@angular/material';
@Component({
@@ -52,7 +52,7 @@ export class FileViewComponent implements OnInit {
showLeftSidebar = null;
showRightSidebar = false;
customToolbar = false;
isCommentDisabled = false;
isCommentEnabled = false;
constructor(private router: Router,
private route: ActivatedRoute,
@@ -68,7 +68,8 @@ export class FileViewComponent implements OnInit {
this.nodeApiService.getNode(id).subscribe(
(node) => {
if (node && node.isFile) {
this.isCommentDisabled = this.contentServices.hasPermissions(node, PermissionsEnum.CONSUMER);
this.isCommentEnabled = this.contentServices.hasPermissions(node, PermissionsEnum.NOT_CONSUMER) ||
this.contentServices.hasAllowableOperations(node, AllowableOperationsEnum.UPDATE);
this.nodeId = id;
return;
}