IAuthorizeDataPortal / IInterceptDataPortal and DataPortalOperations.Execute

IAuthorizeDataPortal / IInterceptDataPortal and DataPortalOperations.Execute

Old forum URL: forums.lhotka.net/forums/t/12038.aspx

DrLik posted on Tuesday, June 25, 2013


I have implemented both IAutorizeDataPortal and IInterceptDataPortal in my project. When commands are executed, IInterceptDataPortal methods gets DataPortalOperations.Execute parameter, but IAutorizeDataPortal.Authorize gets DataPortalOperations.Update. The difference is in server DataPortal class Update method:

if (obj is Core.ICommandObject)
  operation = DataPortalOperations.Execute;
Initialize(new InterceptArgs { ObjectType = objectType, Parameter = obj, Operation = operation, IsSync = isSync });

AuthorizeRequest(new AuthorizeRequest(objectType, obj, DataPortalOperations.Update));

Is it bug or feature? For my case it would be better to have both parameter the same... :)



JonnyBee replied on Tuesday, June 25, 2013


It is a bug. Thanks for reporting this.

See: https://github.com/MarimerLLC/csla/issues/166

Copyright (c) Marimer LLC