|
@@ -162,7 +162,6 @@ namespace PDF_Master.ViewModels.Dialog.ToolsDialogs
|
|
|
ClearCommand = new DelegateCommand(Clear);
|
|
|
SetPageSizeTypeCommand = new DelegateCommand<object>(SetPageSizeType);
|
|
|
}
|
|
|
-
|
|
|
#endregion
|
|
|
|
|
|
#region 私有方法
|
|
@@ -489,10 +488,26 @@ namespace PDF_Master.ViewModels.Dialog.ToolsDialogs
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- ///Fix:当前情况下,即带着当前文档进入合并,此时可以先行鉴权
|
|
|
- ///鉴权完毕后如果有提权行为,还要给原文档提权
|
|
|
- if (!(CurrentFilePath == doc.FilePath && !string.IsNullOrEmpty(currentLoadedPassword) && doc.UnlockWithPassword(currentLoadedPassword)&&doc.CheckOwnerPassword(currentLoadedPassword)))
|
|
|
-
|
|
|
+ ///Fix:
|
|
|
+ ///情况分为:
|
|
|
+ ///开启路径是当前路径:
|
|
|
+ ///已解锁或本身就无密码->直接加入
|
|
|
+ ///未解锁-> release
|
|
|
+ ///
|
|
|
+ /// 不是当前路径
|
|
|
+ ///解锁或取消->
|
|
|
+ ///
|
|
|
+
|
|
|
+ if(CurrentFilePath == doc.FilePath)
|
|
|
+ {
|
|
|
+
|
|
|
+ if ((!(!doc.IsLocked&&(SecurityHelper.CheckHaveAllPermissions(doc)))) && (!(!string.IsNullOrEmpty(currentLoadedPassword) && doc.UnlockWithPassword(currentLoadedPassword) && doc.CheckOwnerPassword(currentLoadedPassword))))
|
|
|
+ {
|
|
|
+ doc.Release();
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
VerifyPasswordResult condition = SecurityHelper.VerifyPasswordByPasswordKind(doc, EnumPasswordKind.StatusPermissionsPassword, dialogs);
|
|
|
if (condition.IsDiscryptied)
|
|
@@ -500,7 +515,10 @@ namespace PDF_Master.ViewModels.Dialog.ToolsDialogs
|
|
|
if (condition.Password != null)
|
|
|
{
|
|
|
mergeObject.Password = condition.Password;
|
|
|
- doc.UnlockWithPassword(condition.Password);
|
|
|
+ if(doc.UnlockWithPassword(condition.Password))
|
|
|
+ {
|
|
|
+ doc.CheckOwnerPassword(condition.Password);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|