mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2358] Always enabling copy action (#3044)
This commit is contained in:
@@ -19,6 +19,7 @@ export class PermissionsEnum extends String {
|
||||
static DELETE: string = 'delete';
|
||||
static UPDATE: string = 'update';
|
||||
static CREATE: string = 'create';
|
||||
static COPY: string = 'copy';
|
||||
static UPDATEPERMISSIONS: string = 'updatePermissions';
|
||||
static NOT_DELETE: string = '!delete';
|
||||
static NOT_UPDATE: string = '!update';
|
||||
|
@@ -151,6 +151,11 @@ describe('ContentService', () => {
|
||||
expect(contentService.hasPermission(permissionNode, null)).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should havePermission return true if permission parameter is copy', () => {
|
||||
let permissionNode = null;
|
||||
expect(contentService.hasPermission(permissionNode, 'copy')).toBeTruthy();
|
||||
});
|
||||
|
||||
describe('Download blob', () => {
|
||||
|
||||
it('Should use native msSaveOrOpenBlob if the browser is IE', (done) => {
|
||||
|
@@ -213,6 +213,10 @@ export class ContentService {
|
||||
}
|
||||
}
|
||||
|
||||
if (permission === PermissionsEnum.COPY) {
|
||||
hasPermission = true;
|
||||
}
|
||||
|
||||
return hasPermission;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user