Announcement

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

    Making a server DataSource read-only

    I have a DataSource for catalog items that needs to be read-only for all of my SmartGWT clients (i.e., fetch operations are fine for anyone, but no one is permitted to add, update, or remove records). What's the most effective way of doing this? There appear to be access-control attributes on the fields but not on the DataSource as a whole. Rewriting the operation bindings would probably work but doesn't communicate to client components the read-only status.

    #2
    A quick way is to declare operationBindings for non-fetch operations that just say requires="false". The QuickStart Guide mentions this under Declarative Security.

    Comment


      #3
      So the best option is, as I mentioned, to override the bindings and just manually mark all of the associated client-side components as read-only?

      Comment


        #4
        For some definition of "manual", yes. If you have some kind of recurring pattern like a grid/form combo implemented as a component, you can look at the DataSource and see which operationBindings are available in order to enable or disable editing, etc.

        Comment

        Working...
        X