Csla 6 PrivateField getter User.Identity is null on saving of object #3213
Replies: 2 comments 4 replies
-
This is .NET 6 with a remote data portal? Do you have a rule attached to this property (or one that uses the property)? Rules are now re-run as the object graph arrives on the app server, and that could be what's reading the property. Another possibility is that something like |
Beta Was this translation helpful? Give feedback.
-
I am calling this from a MSTest project, so it will be a local data portal. All .Net6 projects. When calling the same test in Csla5, it is not calling the property get. I have commented out all business rules and authorization rules. What is interesting is that for a simple data type e.g. int, DateTime, etc it is not calling the property get, but for any complex data type e.g. List, csla object, it is calling the property get. Here are examples:
Calling of property get on save:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When I call save on my business object, the execution of the Get of the private field property is called. In my case, I am creating a new object for assignment to the backing field. The creation of the new object fails with an authorization exception. This is caused by the ApplicationContext.User.Identity value that is null.
Is there a way to prevent csla to call the getter of a private field on saving of the object?
Beta Was this translation helpful? Give feedback.
All reactions