Autocomplete / tags and AJAX - Page 2

Autocomplete / tags and AJAX

2»

Answers

  • allanallan Posts: 64,136Questions: 1Answers: 10,581 Site admin

    That's a really good point. I'd say that it should be the server that should decide if the client-side should be supplied with the options or not, since the server-side is authoritive on if the user is logged in and what permissions they have. Fields have ->set() and ->get() methods that can be used to control permissions - possibly Options should have something like that as well...!

    Allan

  • Loren MaxwellLoren Maxwell Posts: 430Questions: 102Answers: 10
    edited March 11

    Thanks, @allan -- mine might not be the best setup, but the way I handle it is that the server determines what the page will contain based on permissions and only visitors with editing permission are served the DataTable Editors.

    Essentially all visitors get served the DataTables but visitors with editing permissions also get served the Editors.

    There's obviously some client-side checking of permissions, such as whether to show the editing buttons, etc., but that's easily done without altering the data for table itself and I don't believe compromises security.

    Anyway -- I hope I can convince you to include an option to just do a quick AJAX call for some initial options! :smile:

    And thanks for the exceptional support!

Sign In or Register to comment.