使用嵌入模式調用IsOperationAllowedOnDocument
時,RavenDB會拋出InvalidOperationException
。嵌入模式下不支持RavenDB IsOperationAllowedOnDocument
我可以在IsOperationAllowedOnDocument
實現中看到一個子句檢查嵌入模式下的調用。
namespace Raven.Client.Authorization
{
public static class AuthorizationClientExtensions
{
public static OperationAllowedResult[] IsOperationAllowedOnDocument(this ISyncAdvancedSessionOperation session, string userId, string operation, params string[] documentIds)
{
var serverClient = session.DatabaseCommands as ServerClient;
if (serverClient == null)
throw new InvalidOperationException("Cannot get whatever operation is allowed on document in embedded mode.");
除了不使用嵌入模式以外,是否有解決方法?
謝謝你的時間。