mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
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:
committed by
Mario Romano
parent
721e96c01b
commit
0e4dab8b66
@@ -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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user