Esempio n. 1
0
        private string Check_CanCopyFolder(FolderInfo dnnFolder, bool isFileCheck, bool logDetail)
        {
            if (dnnFolder == null)
            {
                return(LogDetailError(ErrorCodes.FolderDoesNotExist, ToVirtualPath(dnnFolder.FolderPath), logDetail));
            }

            //check permissions
            if (!(FolderPermissionController.CanCopyFolder(dnnFolder)))
            {
                return(LogDetailError(ErrorCodes.CopyFolder_NoPermission, ToVirtualPath(dnnFolder.FolderPath), logDetail));
            }

            return(string.Empty);
        }
        private string Check_CanCopyFolder(string virtualPath, bool logDetail)
        {
            var dnnFolder = GetDNNFolder(virtualPath);

            if (dnnFolder == null)
            {
                return(LogDetailError(ErrorCodes.FolderDoesNotExist, virtualPath, logDetail));
            }

            //check permissions
            if (!(FolderPermissionController.CanCopyFolder(dnnFolder)))
            {
                return(LogDetailError(ErrorCodes.CopyFolder_NoPermission, ToVirtualPath(dnnFolder.FolderPath), logDetail));
            }

            return(string.Empty);
        }