[ADF-2358] Always enabling copy action (#3044)

This commit is contained in:
Vito
2018-03-07 14:11:36 +00:00
committed by Eugenio Romano
parent 232404aef3
commit 6afdbcad7c
6 changed files with 35 additions and 3 deletions

View File

@@ -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';

View File

@@ -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) => {

View File

@@ -213,6 +213,10 @@ export class ContentService {
}
}
if (permission === PermissionsEnum.COPY) {
hasPermission = true;
}
return hasPermission;
}