[ADF-1040] Change document list style rows based on permissions model (#2085)

* Change document list style rows based on permissions model

* fix test
This commit is contained in:
Eugenio Romano
2017-07-17 17:22:08 +01:00
parent 6947e04208
commit a9142e2ca2
29 changed files with 382 additions and 167 deletions

View File

@@ -18,7 +18,7 @@
import { Injectable } from '@angular/core';
import { Response } from '@angular/http';
import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging } from 'alfresco-js-api';
import { AlfrescoApiService, AlfrescoAuthenticationService, AlfrescoContentService, LogService, ThumbnailService } from 'ng2-alfresco-core';
import { AlfrescoApiService, AlfrescoAuthenticationService, AlfrescoContentService, LogService, PermissionsEnum, ThumbnailService } from 'ng2-alfresco-core';
import { Observable } from 'rxjs/Rx';
@Injectable()
@@ -115,6 +115,10 @@ export class DocumentListService {
return this.thumbnailService.getDefaultMimeTypeIcon();
}
hasPermission(node: any, permission: PermissionsEnum|string): boolean {
return this.contentService.hasPermission(node, permission);
}
private handleError(error: Response) {
// in a real world app, we may send the error to some remote logging infrastructure
// instead of just logging it to the console