Print Page | Close Window

How can I write server-side logic to bypass client constraints

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2324
Printed Date: 03-May-2025 at 5:58am


Topic: How can I write server-side logic to bypass client constraints
Posted By: jairov4
Subject: How can I write server-side logic to bypass client constraints
Date Posted: 21-Nov-2010 at 5:41pm
I have a little set of Entities marked with [ClientCanSave(false)] attribute and I am exposing server methods to deal with this entities BUT when I call this methods using InvokeServerMethod() the server method has an EntityManager reference (on the server-side) with the same security constraints. Then all modifications to that set of entities will fail because the logged user is not allowed to save that entities even when the logic is running on server-side.
How can I write server-side logic with no client constraints?



Replies:
Posted By: sbelini
Date Posted: 30-Nov-2010 at 9:37am
Hi jairov4,
 
After some investigation, I found out that this is not possible at the moment. I apologize for the inconvenience.
 
I'm creating a feature request to include the ability to pass an identifier in a SaveChanges/SaveChangesAsync (similar to a tag in a query) so we can identify the origin of the save and override the ClientCanSave method to remove the saving restrictions if appropriate.
 
Regards,
   sbelini.



Print Page | Close Window