@syncfusion/ej2-filemanager
Advanced tools
Comparing version 17.3.21 to 17.3.26
@@ -11,2 +11,11 @@ # Changelog | ||
#### New Features | ||
- Support has been provided to include a custom message in `AccessRule` class using the message property. | ||
#### Breaking Changes | ||
- Now, in access control, the `FolderRule` and `FileRule` classes are combined into a single `AccessRule` class, where you can specify both folder and file rules by using the `IsFile` property. | ||
- Now, the `Edit` and `EditContents` in access control are renamed as `Write` and `WriteContents`. | ||
## 17.3.17 (2019-10-15) | ||
@@ -13,0 +22,0 @@ |
/*! | ||
* filename: index.d.ts | ||
* version : 17.3.21 | ||
* version : 17.3.26 | ||
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
@@ -5,3 +5,3 @@ { | ||
"_inBundle": false, | ||
"_integrity": "sha512-gAV+JEa0X00VEZg73RhajDLcMDKZxpFAtnrBCIbxnUrxDrC5b/JXQTnxjMuNq6vgRp/1Tg72EYNz7VYeaHq/tg==", | ||
"_integrity": "sha512-F/s9AnxikHAHk3dCnm+2tAcCkxIpQ6RbmZssqkpiVO61hh/HN6lWMuK7T/udOKJ+3Np/k3blTFHzeqqFCptPiw==", | ||
"_location": "/@syncfusion/ej2-filemanager", | ||
@@ -28,3 +28,3 @@ "_phantomChildren": {}, | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-filemanager/-/ej2-filemanager-17.3.19.tgz", | ||
"_shasum": "c4cede7936e6b241b0669285cc7f5d4f78fe5e0d", | ||
"_shasum": "ccb845e2f0c68fda0baf216f276a868cb27403ff", | ||
"_spec": "@syncfusion/ej2-filemanager@*", | ||
@@ -40,4 +40,4 @@ "_where": "/jenkins/workspace/ation_hotfix_17.2.0.34_Vol2-DDPJ6C2YEWTWLLKKNA7AG2JBE6DYTCTNGMHGORWGAYAVCL6L7OLQ/packages/included", | ||
"dependencies": { | ||
"@syncfusion/ej2-grids": "~17.3.21", | ||
"@syncfusion/ej2-layouts": "~17.3.21", | ||
"@syncfusion/ej2-grids": "~17.3.26", | ||
"@syncfusion/ej2-layouts": "~17.3.26", | ||
"selenium-webdriver": "^4.0.0-alpha.1" | ||
@@ -64,4 +64,4 @@ }, | ||
"typings": "index.d.ts", | ||
"version": "17.3.21", | ||
"version": "17.3.26", | ||
"sideEffects": false | ||
} |
@@ -100,3 +100,3 @@ import { Toolbar as BaseToolbar } from '@syncfusion/ej2-navigations'; | ||
if (!hasEditAccess(details[i])) { | ||
createDeniedDialog(_this.parent, details[i]); | ||
createDeniedDialog(_this.parent, details[i], events.permissionEdit); | ||
return; | ||
@@ -127,3 +127,3 @@ } | ||
if (!hasEditAccess(details[0])) { | ||
createDeniedDialog(_this.parent, details[0]); | ||
createDeniedDialog(_this.parent, details[0], events.permissionEdit); | ||
} | ||
@@ -130,0 +130,0 @@ else { |
@@ -123,1 +123,13 @@ /** | ||
export declare const methodCall: string; | ||
/** @hidden */ | ||
export declare const permissionRead: string; | ||
/** @hidden */ | ||
export declare const permissionEdit: string; | ||
/** @hidden */ | ||
export declare const permissionEditContents: string; | ||
/** @hidden */ | ||
export declare const permissionCopy: string; | ||
/** @hidden */ | ||
export declare const permissionUpload: string; | ||
/** @hidden */ | ||
export declare const permissionDownload: string; |
@@ -123,1 +123,13 @@ /** | ||
export var methodCall = 'method-call'; | ||
/** @hidden */ | ||
export var permissionRead = 'read'; | ||
/** @hidden */ | ||
export var permissionEdit = 'write'; | ||
/** @hidden */ | ||
export var permissionEditContents = 'writeContents'; | ||
/** @hidden */ | ||
export var permissionCopy = 'copy'; | ||
/** @hidden */ | ||
export var permissionUpload = 'upload'; | ||
/** @hidden */ | ||
export var permissionDownload = 'download'; |
@@ -521,3 +521,3 @@ var __extends = (this && this.__extends) || (function () { | ||
args.cancel = true; | ||
createDeniedDialog(this, details); | ||
createDeniedDialog(this, details, events.permissionUpload); | ||
return; | ||
@@ -590,3 +590,3 @@ } | ||
if (!hasContentAccess(this.itemData[0])) { | ||
createDeniedDialog(this, this.itemData[0]); | ||
createDeniedDialog(this, this.itemData[0], events.permissionEditContents); | ||
} | ||
@@ -839,3 +839,3 @@ else { | ||
if (!hasContentAccess(details[0])) { | ||
createDeniedDialog(this, details[0]); | ||
createDeniedDialog(this, details[0], events.permissionEditContents); | ||
} | ||
@@ -842,0 +842,0 @@ else { |
@@ -31,3 +31,2 @@ import { IFileManager, ReadArgs, SearchArgs } from '../base/interface'; | ||
export declare function getFullPath(parent: IFileManager, data: Object, path: string): string; | ||
export declare function getFullName(item: Object): string; | ||
export declare function getName(parent: IFileManager, data: Object): string; | ||
@@ -70,3 +69,3 @@ export declare function getSortedData(parent: IFileManager, items: Object[]): Object[]; | ||
export declare function doDownloadFiles(parent: IFileManager, data: Object[], newIds: string[]): void; | ||
export declare function createDeniedDialog(parent: IFileManager, data: Object): void; | ||
export declare function createDeniedDialog(parent: IFileManager, data: Object, action: string): void; | ||
export declare function getAccessClass(data: Object): string; | ||
@@ -73,0 +72,0 @@ export declare function hasReadAccess(data: Object): boolean; |
@@ -224,3 +224,3 @@ import * as CLS from '../base/classes'; | ||
if (!hasReadAccess(parent.itemData[0])) { | ||
createDeniedDialog(parent, parent.itemData[0]); | ||
createDeniedDialog(parent, parent.itemData[0], events.permissionRead); | ||
} | ||
@@ -309,2 +309,3 @@ else { | ||
} | ||
/* istanbul ignore next */ | ||
export function getFullPath(parent, data, path) { | ||
@@ -320,8 +321,2 @@ var filePath = getValue(parent.hasId ? 'id' : 'name', data) + '/'; | ||
} | ||
export function getFullName(item) { | ||
var fullName; | ||
var fileName = getValue('name', item); | ||
fullName = getValue('filterPath', item).replace(/\\/g, '/') + fileName; | ||
return fullName; | ||
} | ||
export function getName(parent, data) { | ||
@@ -791,2 +786,3 @@ var name = getValue('name', data); | ||
} | ||
// Ignored the message key value in permission object | ||
export function objectToString(data) { | ||
@@ -796,3 +792,5 @@ var str = ''; | ||
for (var i = 0; i < keys.length; i++) { | ||
str += (i === 0 ? '' : ', ') + keys[i] + ': ' + getValue(keys[i], data); | ||
if (keys[i] !== 'message') { | ||
str += (i === 0 ? '' : ', ') + keys[i] + ': ' + getValue(keys[i], data); | ||
} | ||
} | ||
@@ -815,3 +813,3 @@ return str; | ||
if (!hasEditAccess(parent.itemData[0])) { | ||
createDeniedDialog(parent, parent.itemData[0]); | ||
createDeniedDialog(parent, parent.itemData[0], events.permissionEdit); | ||
} | ||
@@ -827,3 +825,3 @@ else { | ||
if (!hasDownloadAccess(items[i])) { | ||
createDeniedDialog(parent, items[i]); | ||
createDeniedDialog(parent, items[i], events.permissionDownload); | ||
return; | ||
@@ -839,3 +837,3 @@ } | ||
if (!hasEditAccess(data[i])) { | ||
createDeniedDialog(parent, data[i]); | ||
createDeniedDialog(parent, data[i], events.permissionEdit); | ||
return; | ||
@@ -851,3 +849,3 @@ } | ||
if (!hasDownloadAccess(data[i])) { | ||
createDeniedDialog(parent, data[i]); | ||
createDeniedDialog(parent, data[i], events.permissionDownload); | ||
return; | ||
@@ -861,3 +859,6 @@ } | ||
} | ||
export function createDeniedDialog(parent, data) { | ||
export function createDeniedDialog(parent, data, action) { | ||
var message = getValue('message', getValue('permission', data)); | ||
message = (message === '') ? '"' + getValue('name', data) + '" is not accessible. You need permission to perform the ' + | ||
action + ' action.' : message; | ||
var response = { | ||
@@ -867,3 +868,3 @@ error: { | ||
fileExists: null, | ||
message: '"' + getFullName(data) + '" is not accessible. Access is denied.' | ||
message: message | ||
} | ||
@@ -882,15 +883,15 @@ }; | ||
var permission = getValue('permission', data); | ||
return permission ? ((getValue('read', permission) && getValue('edit', permission)) ? true : false) : true; | ||
return permission ? ((getValue('read', permission) && (getValue('write', permission)))) : true; | ||
} | ||
export function hasContentAccess(data) { | ||
var permission = getValue('permission', data); | ||
return permission ? ((getValue('read', permission) && getValue('editContents', permission)) ? true : false) : true; | ||
return permission ? ((getValue('read', permission) && (getValue('writeContents', permission)))) : true; | ||
} | ||
export function hasUploadAccess(data) { | ||
var permission = getValue('permission', data); | ||
return permission ? ((getValue('read', permission) && getValue('upload', permission)) ? true : false) : true; | ||
return permission ? ((getValue('read', permission) && getValue('upload', permission))) : true; | ||
} | ||
export function hasDownloadAccess(data) { | ||
var permission = getValue('permission', data); | ||
return permission ? ((getValue('read', permission) && getValue('download', permission)) ? true : false) : true; | ||
return permission ? ((getValue('read', permission) && getValue('download', permission))) : true; | ||
} | ||
@@ -900,3 +901,3 @@ export function createNewFolder(parent) { | ||
if (!hasContentAccess(details)) { | ||
createDeniedDialog(parent, details); | ||
createDeniedDialog(parent, details, events.permissionEditContents); | ||
} | ||
@@ -910,3 +911,3 @@ else { | ||
if (!hasUploadAccess(details)) { | ||
createDeniedDialog(parent, details); | ||
createDeniedDialog(parent, details, events.permissionUpload); | ||
} | ||
@@ -913,0 +914,0 @@ else { |
@@ -811,3 +811,3 @@ import { ListBase } from '@syncfusion/ej2-lists'; | ||
if (!hasReadAccess(details_1)) { | ||
createDeniedDialog(this.parent, details_1); | ||
createDeniedDialog(this.parent, details_1, events.permissionRead); | ||
return; | ||
@@ -1021,3 +1021,3 @@ } | ||
if (!hasEditAccess(data[i])) { | ||
createDeniedDialog(this.parent, data[i]); | ||
createDeniedDialog(this.parent, data[i], events.permissionEdit); | ||
return; | ||
@@ -1429,3 +1429,3 @@ } | ||
if (!hasEditAccess(this.parent.itemData[0])) { | ||
createDeniedDialog(this.parent, this.parent.itemData[0]); | ||
createDeniedDialog(this.parent, this.parent.itemData[0], events.permissionEdit); | ||
} | ||
@@ -1432,0 +1432,0 @@ else { |
@@ -674,3 +674,3 @@ import { TreeView as BaseTreeView } from '@syncfusion/ej2-navigations'; | ||
if (!hasEditAccess(this.parent.itemData[0])) { | ||
createDeniedDialog(this.parent, this.parent.itemData[0]); | ||
createDeniedDialog(this.parent, this.parent.itemData[0], events.permissionEdit); | ||
} | ||
@@ -695,3 +695,3 @@ else { | ||
if (!hasDownloadAccess(this.parent.itemData[0])) { | ||
createDeniedDialog(this.parent, this.parent.itemData[0]); | ||
createDeniedDialog(this.parent, this.parent.itemData[0], events.permissionDownload); | ||
return; | ||
@@ -707,3 +707,3 @@ } | ||
if (!hasEditAccess(data)) { | ||
createDeniedDialog(this.parent, data); | ||
createDeniedDialog(this.parent, data, events.permissionEdit); | ||
} | ||
@@ -710,0 +710,0 @@ else { |
@@ -340,3 +340,3 @@ import { ContextMenu as Menu } from '@syncfusion/ej2-navigations'; | ||
if (!hasEditAccess(details[j])) { | ||
createDeniedDialog(_this.parent, details[j]); | ||
createDeniedDialog(_this.parent, details[j], events.permissionEdit); | ||
return; | ||
@@ -351,3 +351,3 @@ } | ||
if (!hasDownloadAccess(details[i])) { | ||
createDeniedDialog(_this.parent, details[i]); | ||
createDeniedDialog(_this.parent, details[i], events.permissionDownload); | ||
return; | ||
@@ -365,3 +365,3 @@ } | ||
if (!hasEditAccess(details[0])) { | ||
createDeniedDialog(_this.parent, details[0]); | ||
createDeniedDialog(_this.parent, details[0], events.permissionEdit); | ||
} | ||
@@ -368,0 +368,0 @@ else { |
@@ -532,3 +532,4 @@ import { Dialog } from '@syncfusion/ej2-popups'; | ||
if (event_1.error.code === '401') { | ||
options.header = getLocaleText(parent, 'Access-Denied'); | ||
options.header = '<span class="e-fe-icon e-fe-access-error"></span><div class="e-fe-access-header">' + | ||
getLocaleText(parent, 'Access-Denied') + '</div>'; | ||
} | ||
@@ -535,0 +536,0 @@ else { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8585695
68101