Skip to content
Snippets Groups Projects

Load users asynchronously instead of preloading (also in Cocoon dropdowns)

Edited by Martin Mladenov

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Martin Mladenov resolved all threads

    resolved all threads

  • Martin Mladenov added 12 commits

    added 12 commits

    • 4823a26c...d7a6a991 - 10 commits from branch development
    • f2eba6ba - Merge branch 'development' into 397-add-ldap-search-to-cocoon-dropdowns
    • 28e39f5a - Move LDAP JS to a .js file

    Compare with previous version

    • Add a user search endpoint
      • Handle diacritics (e.g. ü, å, etc.)
    • Make searching dynamic (i.e. do not preload users)
    • Add an optional list of preferred users to show at the top (to preserve functionality)
    • Maybe try to preload the selected user
      • alternatively, load that user when initialising the component
    • Add an optional list of allowed user ids
    • Be careful who can access the user search endpoint
    Edited by Martin Mladenov
  • Martin Mladenov changed the description

    changed the description

  • The query produced while searching is something similar to this:

    SELECT "users".* FROM "users" WHERE (first_name || ' ' || last_name LIKE '%martin%') ORDER BY "users"."first_name" ASC LIMIT 50

    We should check how fast this can execute when the database contains a lot of users.

  • Martin Mladenov added 4 commits

    added 4 commits

    • b5488d01 - Add endpoint for searching for users
    • e9efdd14 - Make user dropdown load users dynamically
    • 2c9b3d88 - Display spinner while loading users
    • 9e3286b3 - Simplify user search logic

    Compare with previous version

    • Resolved by Martin Mladenov

      We should make searching case-insensitive and accent-insensitive (e.g. 'mul' should match 'Müller').

      Based on some quick tests on staging, I think that in mariadb the default collation of the first and last name columns handles this.

      image

      The default collation on sqlite is not accent-insensitive so I cannot yet test this with the user search endpoint. After deploying this feature to staging, we should check whether this works as expected.

  • Martin Mladenov added 9 commits

    added 9 commits

    Compare with previous version

  • Martin Mladenov changed title from Draft: Add LDAP search to Cocoon dropdowns to Draft: Load users asynchronously instead of preloading (also in Cocoon dropdowns)

    changed title from Draft: Add LDAP search to Cocoon dropdowns to Draft: Load users asynchronously instead of preloading (also in Cocoon dropdowns)

    • Resolved by Martin Mladenov

      As a side effect, all users can be selected everywhere. For example, previously only staff members could be selected as responsible users for thesis projects and themes. Now any user can be added, including students and external users. Is this fine or should there be filters in some places?

  • Martin Mladenov changed the description

    changed the description

  • Martin Mladenov added 12 commits

    added 12 commits

    • b0f8f5cc - Fix error when there is one preferred user
    • 2a5aa078 - Reduce code duplication
    • fa0e2c92 - Add ability to pre-select a user
    • 5bcced03 - Improve code style
    • a8be321b - Make user dropdown work with cocoons
    • d587504d - Preserve the selected user when using browser navigation buttons
    • 381df11e - Replace let with var to allow redeclaration without errors in the console
    • 64cfd28f - Remove unused partial
    • f7395684 - Remove duplicated partial
    • 25ee3c7d - Use user dropdown component where possible
    • b5ea6b83 - Remove unused code
    • d3dbb6b7 - Rename preferred to preferred_ids and selected to selected_id

    Compare with previous version

  • Martin Mladenov marked this merge request as ready

    marked this merge request as ready

  • Anna Kalandadze
  • Martin Mladenov added 2 commits

    added 2 commits

    • 310e3f21 - Add test for ldap permissions
    • 4830b923 - Add tests for search controller

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Martin Mladenov
  • reopened

  • Martin Mladenov marked this merge request as draft

    marked this merge request as draft

  • added 1 commit

    • 60214387 - Use Arel to partially build query

    Compare with previous version

  • added 1 commit

    • 77d558a4 - Add "Loading" text when initialising dropdown

    Compare with previous version

  • Martin Mladenov marked this merge request as ready

    marked this merge request as ready

  • Martin Mladenov added 21 commits

    added 21 commits

    • 77d558a4...ae8769e1 - 16 commits from branch development
    • 880e7391 - Add validation to block users who are not staff members from being added as associated users
    • c30c38e0 - Add validation to block users who are not staff members from being added to research groups
    • 7c239596 - Use user dropdown to select researchers
    • 6b64b1a0 - Merge branch 'development' into 397-add-ldap-search-to-cocoon-dropdowns
    • 7f49cc8f - Make a sacrifice to the linter gods

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Martin Mladenov marked this merge request as draft

    marked this merge request as draft

  • Martin Mladenov marked this merge request as ready

    marked this merge request as ready

  • requested review from @akalandadze

  • Martin Mladenov added 20 commits

    added 20 commits

    • 576128c9...e011a584 - 18 commits from branch development
    • 093bf188 - Merge branch 'development' into 397-add-ldap-search-to-cocoon-dropdowns
    • a9070ef9 - Revert "Add validation to block users who are not staff members from being...

    Compare with previous version

  • added 1 commit

    • 7a2cedc3 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Martin Mladenov approved this merge request

    approved this merge request

  • mentioned in commit 633f0cbe

  • Martin Mladenov resolved all threads

    resolved all threads

  • Please register or sign in to reply
    Loading