mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
auto-disable "new folder" dialog in demo shell (#2694)
This commit is contained in:
committed by
Eugenio Romano
parent
b0c599c115
commit
afcd4e5809
@@ -21,7 +21,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||
import { MinimalNodeEntity, NodePaging, Pagination } from 'alfresco-js-api';
|
||||
import { MinimalNodeEntity, NodePaging, Pagination, MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import {
|
||||
AlfrescoApiService, ContentService, TranslationService,
|
||||
FileUploadEvent, FolderCreatedEvent, LogService, NotificationService,
|
||||
@@ -437,6 +437,13 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
return false;
|
||||
}
|
||||
|
||||
canCreateContent(parentNode: MinimalNodeEntryEntity): boolean {
|
||||
if (parentNode) {
|
||||
return this.contentService.hasPermission(parentNode, 'create');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
onChangePageSize(event: Pagination): void {
|
||||
this.preference.paginationSize = event.maxItems;
|
||||
this.currentMaxItems = event.maxItems;
|
||||
|
Reference in New Issue
Block a user