Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Field-Level Declarative Security

    It seems you could accomplish declaritive security on individual controls as long as they are bound to a data-source?

    http://blog.isomorphic.com/field-lev...ative-security

    It says:

    * If a user is not allowed to see a field, that field is omitted entirely from the DataSource definition, and automatically omitted from data delivered to that client
    * If a user is not allowed to edit a field, that field is shown as read-only by all DataBoundComponents that support editing, and any attempt to modify the field will
    be rejected automatically by the server

    Can you point me to some example code that uses this capability.

    I am new to sgwt so please excuse any blatant ignorance on my part.

    Thanks.
    Last edited by ffeuerbacher; 6 Aug 2014, 15:18.

    Comment


      #17
      Yes, sort of.

      You can declare security rules in your DataSource that will cause a field to be automatically omitted or read-only when a DataBoundComponent uses the DataSource.

      If you have something like a Button "Delete selection", the quickest way to have it be appropriately enabled or disabled is to create helper methods for checking the current user's roles, as described above.

      Comment


        #18
        Databound Only Components?

        From the quick start guide, it looks like the only controls that can bind to a datasource are: DynamicForm, ListGrid, TreeGrid, Calendar, DetailViewer, TileGrid, and ColumnTree?

        Or are these the only databound components that can use declarative security?

        Can I bind something like a simple combobox to a datasource?

        Comment


          #19
          The question you just asked suggests that you've just read the first few lines of the Data Binding chapter, but haven't gotten far enough to realize that ComboBox and most other inputs are always embedded within a DynamicForm..

          Go ahead and finish reading the QuickStart Guide and looking at samples, then come back and ask questions.

          Comment

          Working...
          X