Disable upload button with no permission (#1820)

* Add the permission check on the activiti button

* Fix code after unit test

* Add basic documentation
This commit is contained in:
Maurizio Vitale
2017-04-20 12:06:10 +01:00
committed by Mario Romano
parent 721e96c01b
commit 0e4dab8b66
11 changed files with 301 additions and 29 deletions

View File

@@ -20,7 +20,7 @@ import { Response } from '@angular/http';
import { Observer, Observable } from 'rxjs/Rx';
import { AlfrescoApiService, LogService } from 'ng2-alfresco-core';
import { FileModel } from '../models/file.model';
import { MinimalNodeEntity } from 'alfresco-js-api';
import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
/**
*
@@ -184,4 +184,17 @@ export class UploadService {
this.totalCompletedObserver.next(total);
}
}
getFolderNode(nodeId: string): Observable<MinimalNodeEntryEntity> {
let opts: any = {
includeSource: true,
include: ['allowableOperations']
};
return Observable.fromPromise(this.apiService.getInstance().nodes.getNodeInfo(nodeId, opts))
.map((response: any) => {
return response;
})
.catch(err => this.handleError(err));
}
}