共用方式為


Sample: Dynamic Data and attribute based permissions

Steve Naughton just posted a great series of articles on how he implemented an attribute based permission system that works with Dynamic Data.  This is something that we had been thinking about putting in the product early on, but decided against for a couple reasons:

  • This was a short product cycle for us, and we had some pressure to limit the v1 feature set.
  • We were not confident that we could come up with something generic enough to please everyone, so we opted instead to make Dynamic Data extensible enough that the permission system could be implemented on top of it.

Thanks a lot to Steve for coming up with this and taking the time to blog it so thoroughly!

Feel free to leave comments on Steve's blog, or in this forum thread where he announced it.

Comments

  • Anonymous
    May 27, 2008
    David I posted this question on the asp.net Dynamic Data forum a while back but nobody seemed to have an answer I was wondering if you could take a look.   I am just looking at the doco on the web and the screencasts and the first question I need to ask is about Localization.   If you use the Metadata tags for example public class Product_MD {    [DisplayName("My units")]    [Description("This number shows how many unites are left")]    [Range(0, 150, ErrorMessage = "Incorrect range for the units in stock")]    [UIHint("IntegerSlider")]    public object UnitsInStock { get; set; }    [UIHint("BooleanAjax")]    public object Discontinued { get; set; } } Can you localize as you would any asp.net app the MetaData tags eg.  "My units"  "This number shows how many unites are left" etc.   The apps we create usually need to adapt to different language depending on the user logged in. I would appreciate any feedback.

  • Anonymous
    May 27, 2008
    Steve, can you point me to the forum thread that had this questions?  I'll make sure it gets answered by tomorrow.  It's better to have it there than in this post about permission. David

  • Anonymous
    May 27, 2008
    David, it is on the asp.net dynamic data forum at http://forums.asp.net/t/1246285.aspx The title is 'Localization and Meta data tags' and the user name on the forume is sjariel in case the link does not work.   Many thanks.  I eagerly await a response.  

  • Anonymous
    February 18, 2009
    Please post corrections/new submissions to the Dynamic Data Forum . Put FAQ Submission/Correction in