Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AllUsers and AllGroups #11

Merged
merged 9 commits into from
Nov 1, 2023

Commits on Sep 23, 2023

  1. Refactored BiMap into IdNameMap for future reuse

    - Renamed `BiMap` to `IdNameMap` to better reflect its purpose
    - Extracted type parameters out of `IdNameMap` for ease of reuse
    - Added `IdNameMap::insert` for convenience
    - `UsersCache` now uses a single `RefCell` for both forward and
      backward maps; does not seem to break anything
    - Refactored methods that use `UsersCache::{users,groups}`
      accordingly
    - `UsersCache::default` is now implemented with `derive`; `HashMap`
      nonsense moved into the new `IdNameMap::default`
    OLEGSHA committed Sep 23, 2023
    Configuration menu
    Copy the full SHA
    786f1c6 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2023

  1. Added AllUsers trait and UsersSnapshot

    - Added `AllUsers` trait that provides `all_users()`
    - Added `UsersSnapshot`
      - user data is pre-loaded, not fetched lazily
      - implements `AllUsers` and `Users`
    - `MockUsers` now implements `AllUsers` exposing the list of added
      users
    - Equivalent group functionality NYI
    - Documentation not yet updated
    OLEGSHA committed Sep 24, 2023
    Configuration menu
    Copy the full SHA
    77836eb View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2023

  1. Added AllGroups trait

    - Added `AllGroups` trait that provides `all_groups()`
    - `UsersSnapshot` now implements `Groups` and `AllGroups`
    - `MockUsers` now implements `AllGroups`
    - `UsersSnapshot::filtered` not yet updated: adds all groups
    - Documentation not yet updated
    OLEGSHA committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    039637c View commit details
    Browse the repository at this point in the history
  2. Refactored UsersSnapshot::filtered

    `UsersSnapshot::filtered` has been split into two new methods to
    accomodate the two probable use cases:
    - `::filtered` now accepts a separate filter for groups
    - `::only_users` only accepts groups that are some included user's
      primary group.
    OLEGSHA committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    155e4a1 View commit details
    Browse the repository at this point in the history
  3. Updated documentation to include UsersSnapshot

    - Documentation of `UsersCache` was moved from module to the struct
      itself to keep the module doc from bloating to a billion lines.
    - Description of `UsersCache` in crate doc shortened slightly as it
      is no longer the only solution.
    OLEGSHA committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    2e2cc5e View commit details
    Browse the repository at this point in the history
  4. Added examples/mocking.rs

    OLEGSHA committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    86712b6 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2023

  1. Configuration menu
    Copy the full SHA
    9ee06b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    139a411 View commit details
    Browse the repository at this point in the history
  3. build(src): add deprecated warning to UsersCache::with_all_users

    Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
    gierens committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    f373229 View commit details
    Browse the repository at this point in the history