Commit Graph

526 Commits

Author SHA1 Message Date
dal 6a6b663342
Refactor Snowflake client connection to remove warehouse and database IDs
- Updated the `get_snowflake_client` function to no longer require `warehouse_id` and `database_id`, simplifying the connection process.
- This change enhances flexibility in client initialization and aligns with recent updates to Snowflake API handling.
2025-01-22 11:04:10 -07:00
Nate Kelley 2171e3edad
Merge branch 'dallin/bus-920-feature-finish-rest-of-permissions' of https://github.com/buster-so/buster into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-22 10:32:38 -07:00
Nate Kelley aba1cef762
add datasets to permission groups page 2025-01-22 10:32:28 -07:00
dal 04a745f0ad
Update dependencies and refactor Snowflake query handling
- Downgraded the `base64` crate version in `Cargo.toml` from `0.22.1` to `0.21`.
- Refactored the `snowflake_query` function in `snowflake_query.rs` to improve data type handling, including support for additional Arrow data types and enhanced null value checks.
- Updated the `route_to_query` function in `query_router.rs` to use mutable `snowflake_client` for better state management during query execution.
- Improved error handling for closing the Snowflake client session, ensuring proper logging of any issues encountered.
2025-01-22 10:31:02 -07:00
Nate Kelley 7fc4be939c
add datasets to permission groups page 2025-01-22 10:26:40 -07:00
Nate Kelley 2f47b45b41
add user permission list 2025-01-22 10:08:43 -07:00
Nate Kelley 30cb2a0ff5
added pages for permission groups 2025-01-21 20:26:09 -07:00
Nate Kelley f072b2c461
permission group modal update 2025-01-21 19:51:59 -07:00
Nate Kelley 3fdab95a7d
add additional pages 2025-01-21 17:16:56 -07:00
Nate Kelley 69fa9ecfd5
Merge branch 'dallin/bus-920-feature-finish-rest-of-permissions' of https://github.com/buster-so/buster into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-21 17:10:42 -07:00
Nate Kelley ac6abab27d
Refetch on team created for now 2025-01-21 17:10:40 -07:00
Nate Kelley d64374789c
better handling for create a permission group 2025-01-21 17:07:45 -07:00
dal 7142ee289d
refactor: Enhance dataset access control and lineage tracking
- Streamlined the `get_dataset_overview` function to improve access control for the `RestrictedQuerier` role, ensuring more precise permission checks.
- Updated the `get_user_information` function to optimize dataset processing, categorizing datasets based on direct access and permission group access.
- Removed redundant code and improved readability by consolidating logic for user roles, enhancing maintainability.
- Enhanced lineage tracking for datasets, providing a clearer representation of user permissions across different access types.
2025-01-21 16:42:06 -07:00
Nate Kelley 010b483e63
add endpoints for dataset groups, and permission groups 2025-01-21 16:38:41 -07:00
Nate Kelley 717a9c635e
fix build errors 2025-01-21 16:28:43 -07:00
Nate Kelley 24938e32fa
Merge branch 'dallin/bus-920-feature-finish-rest-of-permissions' of https://github.com/buster-so/buster into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-21 16:14:24 -07:00
Nate Kelley d9c72f2ac4
clickable pills 2025-01-21 16:14:15 -07:00
dal a247a9bae4
feat: Improve dataset access control and lineage tracking
- Enhanced the `get_dataset_overview` function to refine access control for the `RestrictedQuerier` role, allowing for more granular permission checks based on various access paths.
- Updated the `get_user_information` function to streamline dataset processing, ensuring that datasets are categorized correctly based on direct access and permission group access.
- Removed redundant code and improved readability by consolidating logic for user roles, enhancing maintainability of both functions.
- Improved lineage tracking for datasets, providing a clearer representation of user permissions across different access types.
2025-01-21 16:14:02 -07:00
Nate Kelley 67bc9bf002
add datasetgroup handler 2025-01-21 16:08:22 -07:00
Nate Kelley 5a9da850b9
Merge branch 'dallin/bus-920-feature-finish-rest-of-permissions' of https://github.com/buster-so/buster into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-21 16:03:24 -07:00
dal 19b3e17ba9
feat: Refactor dataset overview access lineage in get_dataset_overview
- Introduced a default access lineage for users, ensuring consistent representation of user permissions.
- Simplified the addition of user roles to the lineage, consolidating logic for WorkspaceAdmin, DataAdmin, Querier, and Viewer roles.
- Enhanced lineage tracking for RestrictedQuerier role to include direct dataset access and permission group lineage, improving granularity of dataset permissions.
- Removed redundant code related to dataset and permission group lineage, optimizing readability and maintainability of the `get_dataset_overview` function.
2025-01-21 15:57:46 -07:00
dal e0e4ebaf6d
refactor: Streamline dataset access logic in get_user_information
- Simplified access control logic for datasets based on user roles, consolidating conditions for WorkspaceAdmin, DataAdmin, Querier, Viewer, and RestrictedQuerier.
- Enhanced dataset lineage tracking to provide clearer representation of user permissions across various dataset access types.
- Removed redundant code related to dataset processing, improving readability and maintainability of the `get_user_information` function.
- Ensured that datasets are correctly categorized based on direct access, permission group access, and organization datasets, optimizing the overall data retrieval process.
2025-01-21 15:53:16 -07:00
Nate Kelley e8c98b033f
Merge branch 'dallin/bus-920-feature-finish-rest-of-permissions' of https://github.com/buster-so/buster into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-21 15:46:33 -07:00
Nate Kelley 3293a02a0b
lineage props passed 2025-01-21 15:46:12 -07:00
dal 11064cd9d2
feat: Enhance dataset access retrieval in user and dataset overview
- Updated `get_dataset_overview` to include dataset group access and permission group to dataset group access, improving the granularity of dataset permissions.
- Introduced new queries to fetch dataset groups and their associated permissions, enhancing the dataset overview for users.
- Refactored `get_user_information` to concurrently retrieve dataset groups and permission group datasets, optimizing performance with `tokio::spawn`.
- Enhanced lineage tracking for datasets, allowing for better representation of user permissions across dataset groups and permission groups.
- Improved error handling during database queries to ensure robust data retrieval.
2025-01-21 15:37:07 -07:00
dal 03aa9b04ab
feat: Enhance user retrieval with dataset information
- Added new structs `DatasetLineage` and `DatasetInfo` to represent dataset details and lineage.
- Updated `UserResponse` to include a list of datasets associated with the user.
- Refactored `get_user_information` function to concurrently fetch user info, direct datasets, permission group datasets, and organization datasets using `tokio::spawn` for improved performance.
- Implemented logic to compile datasets based on direct access and permission group access, including lineage tracking for better data representation.
- Enhanced error handling during database queries to ensure robust user information retrieval.
2025-01-21 15:18:31 -07:00
Nate Kelley a9902d59bf
assigned popup 2025-01-21 13:39:57 -07:00
Nate Kelley 4399130016
add team modal to teams 2025-01-21 12:45:26 -07:00
Nate Kelley 61e928714e
create a dataset modal added to user page 2025-01-21 12:14:39 -07:00
Nate Kelley 118ed146a3
Merge branch 'dallin/bus-920-feature-finish-rest-of-permissions' of https://github.com/buster-so/buster into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-21 12:01:56 -07:00
Nate Kelley 2273892fad
invalidate query if user id is present 2025-01-21 12:01:33 -07:00
dal 71c234aa4b
feat: Add DatasetToDatasetGroup model and update schema
- Introduced a new `DatasetToDatasetGroup` struct to represent the relationship between datasets and dataset groups, including fields for timestamps and optional deletion.
- Updated the database schema to include `updated_at` and `deleted_at` fields for the `datasets_to_dataset_groups` table, enhancing data tracking capabilities.
- Refactored the routing in `mod.rs` to include a nested router for assets, improving the organization of dataset group routes.
2025-01-21 11:53:47 -07:00
Nate Kelley 395b1773e0
Add attributes and teams 2025-01-21 11:50:05 -07:00
Nate Kelley 78ffb7f8c5
assigned permissions 2025-01-21 11:27:21 -07:00
Nate Kelley 5f73f3727f
add list for datasets 2025-01-21 11:23:48 -07:00
Nate Kelley dd03a52986
Merge branch 'dallin/bus-920-feature-finish-rest-of-permissions' of https://github.com/buster-so/buster into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-21 11:18:03 -07:00
Nate Kelley dccd1ee345
add listing for dataset groups 2025-01-21 11:17:55 -07:00
dal 77792c3cb9
feat: Add PUT routes for user and dataset management in assets module
- Introduced new PUT routes for managing users and dataset groups in the assets module.
- Updated the router to support PUT requests for `/users`, `/dataset_groups`, and `/datasets`, enhancing the API's functionality for resource updates.
- Improved modularity by organizing related routes within the assets module.
2025-01-21 11:15:57 -07:00
Nate Kelley 1da6454959
Merge branch 'dallin/bus-920-feature-finish-rest-of-permissions' of https://github.com/buster-so/buster into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-21 11:06:48 -07:00
Nate Kelley 0381c9b04a
add listing for dataset groups 2025-01-21 11:06:37 -07:00
dal 2fc78fdb84
refactor: Update list_permission_groups_handler to use user_id and improve SQL queries
- Changed the parameter in the SQL query from `user.id` to `user_id` for consistency with the updated user ID parameter naming convention.
- Enhanced the SQL query to count distinct dataset permissions and utilize `bool_or` for identity checks, improving accuracy and performance.
- Cleaned up the grouping in the SQL query by removing unnecessary fields, streamlining the data retrieval process.
2025-01-21 11:01:29 -07:00
Nate Kelley 27d8293854
Merge branch 'dallin/bus-920-feature-finish-rest-of-permissions' of https://github.com/buster-so/buster into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-21 10:45:13 -07:00
Nate Kelley 1c94f2ffd2
create permission group users 2025-01-21 10:45:05 -07:00
dal c47315617a
feat: Introduce assets module and update routing for permission groups
- Added a new `assets` module to organize related routes.
- Updated the routing in `mod.rs` to nest the `assets` router under the `/:permission_group_id` path, enhancing the structure and clarity of the API.
- Maintained existing routes for managing permission groups while improving modularity.
2025-01-21 10:44:48 -07:00
Nate Kelley fd5251af3f
Merge branch 'dallin/bus-920-feature-finish-rest-of-permissions' of https://github.com/buster-so/buster into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-21 10:23:47 -07:00
Nate Kelley 2be23179e1
add list components for permission settings 2025-01-21 10:23:44 -07:00
dal ef5ca25810
feat: Add organization_id to DatasetGroupPermission and update dataset group handler
- Introduced a new `organization_id` field in the `DatasetGroupPermission` struct to associate permissions with specific organizations.
- Updated the `put_dataset_groups_handler` to include `organization_id` when creating or updating dataset group permissions, enhancing the API's capability to manage permissions at the organizational level.
- Improved SQL query formatting for better readability in the handler.
2025-01-21 10:23:22 -07:00
dal 1d8da61087
feat: Enhance team management with role-based assignments
- Introduced a new `TeamInfoRole` enum to represent user roles within teams, replacing the previous boolean `assigned` field.
- Updated the `list_teams` handler to return team roles instead of assignment status, improving clarity on user roles.
- Refactored the `put_teams` handler to support role-based assignments, allowing for more granular control over team memberships.
- Added new PUT routes for dataset groups and permission groups in the user assets router, enhancing API capabilities.
- Improved SQL queries for team assignments to utilize role information, streamlining database interactions.
2025-01-21 10:16:52 -07:00
dal d21da1e31a
refactor: Standardize user ID parameter naming across user-related routes
- Updated all user-related route handlers to use `user_id` instead of `id` for better clarity and consistency.
- Modified the routing definitions in `mod.rs` to reflect the new parameter naming convention.
- Enhanced the `list_permission_groups` function to accept `user_id` as a parameter, improving clarity in the handler's signature.
- Ensured all relevant functions now consistently handle the `user_id` parameter, streamlining the codebase and improving maintainability.
2025-01-21 09:43:12 -07:00
dal d7cd961059
refactor: Clean up routing and improve PUT teams handler
- Reformatted imports in `mod.rs` for better readability.
- Commented out the PUT route for `/teams` in the user assets router, indicating a potential future change or deprecation.
- Updated the `put_teams` handler to return a `NoContent` response upon successful execution, enhancing clarity in API responses.
- Improved error handling in the `put_teams` function for better logging and response management.
2025-01-21 08:45:30 -07:00