Commit Graph

380 Commits

Author SHA1 Message Date
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
Nate Kelley 72c2c22d20
move files to match new page structure 2025-01-20 21:05:23 -07:00
Nate Kelley 4c5315f332
create permission user endpoints 2025-01-20 20:31:43 -07:00
Nate Kelley 2f995bf2f0
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-20 17:01:20 -07:00
Nate Kelley 64ebeddb6e
onchagne appsegmetned update 2025-01-20 17:01:10 -07:00
dal 9b33f26f17
feat: Add PUT route for updating teams in user assets
- Introduced a new module `put_teams` to handle updates for teams.
- Added a PUT route for `/teams` in the user assets router, allowing for team modifications.
- Enhanced the routing capabilities of the user assets API to support both GET and PUT requests for teams.
2025-01-20 16:50:50 -07:00
dal dcb7c5ef98
feat: Enhance permission group handling and streamline SQL queries
- Expanded the `allow_columns_to_appear_in_same_group_by_clause!` macro in `models.rs` to include additional columns for datasets and users, improving query flexibility.
- Refactored the `list_permission_groups` function to include dataset count and assigned status, enhancing the information returned for each permission group.
- Updated SQL queries in `list_permission_groups` to utilize left joins for better data retrieval and to ensure accurate permission checks.
- Removed redundant column allowances in various files, streamlining the codebase and improving maintainability.
2025-01-20 16:44:13 -07:00
Nate Kelley 41ff258a35
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-20 16:37:33 -07:00
Nate Kelley db4188a410
pass last child as index 2025-01-20 16:37:16 -07:00
dal 31473f8d55
feat: Enhance user authorization checks and refactor related functions
- Added user authorization checks in `list_attributes`, `list_dataset_groups`, `list_datasets`, `list_permission_groups`, and `list_teams` functions to ensure only users with appropriate roles can access these resources.
- Refactored the `list_teams_handler` to accept `user_id` as a parameter, improving clarity and consistency across user-related functions.
- Updated SQL queries to utilize the new authorization checks, enhancing security and data integrity.
- Removed redundant column allowances in `list_teams` permissions, streamlining the codebase.
2025-01-20 16:29:46 -07:00
Nate Kelley 094be8a3f1
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-20 16:11:59 -07:00
Nate Kelley e1a23a0656
popup conatiner for users 2025-01-20 16:11:49 -07:00
dal bdb83d4b82
new line 2025-01-20 16:10:48 -07:00
Nate Kelley 5d8a3a3337
normalize header for list 2025-01-20 16:08:08 -07:00
Nate Kelley 909a7edd95
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-20 15:58:04 -07:00
dal 8ae08b00e6
fix: Correct user role attribute and enhance read-only logic in list_attributes_handler
- Updated the user role attribute key from "role" to "organization_role" for accurate role retrieval.
- Introduced a read-only flag for specific user attributes, improving data integrity by clearly indicating which attributes should not be modified.
- Enhanced error handling for user role retrieval, ensuring robust responses for missing or incorrect attributes.
2025-01-20 15:57:31 -07:00
dal 94be56e042
feat: Refactor dataset listing to include user-specific permissions
- Updated the `list_datasets` function to accept an additional `id` parameter for filtering datasets based on user permissions.
- Enhanced the SQL query to join with the `dataset_permissions` table, allowing retrieval of permission details for each dataset.
- Refactored the `DatasetInfo` struct to include an `assigned` field, improving clarity in the dataset representation.
- Improved error handling for dataset retrieval, ensuring robust logging and response management.
2025-01-20 15:47:01 -07:00
dal df231a81d9
feat: Update dataset group listing to include dataset group permissions
- Modified the `list_dataset_groups` function to accept an additional `id` parameter for filtering dataset groups based on user permissions.
- Updated the SQL query to join with the `dataset_groups_permissions` table, allowing retrieval of permission counts for each dataset group.
- Refactored the `DatasetGroupInfo` struct to replace `permission_id` with `permission_count`, enhancing clarity and accuracy in the data representation.
- Ensured that the query groups by the new permission structure, improving the functionality and security of dataset group listings.
2025-01-20 15:40:50 -07:00
Nate Kelley 1d93aff922
add component for users inputs 2025-01-20 15:34:09 -07:00
dal b9b5146299
feat: Add DatasetGroupPermission model and schema
- Introduced a new `DatasetGroupPermission` struct in `models.rs` to represent permissions associated with dataset groups.
- Updated the database schema in `schema.rs` to include the `dataset_groups_permissions` table, defining its structure and relationships.
- Modified the `is_user_workspace_admin_or_data_admin` function in `checks.rs` to correctly reference the user's organization role, enhancing role validation logic.
2025-01-20 15:24:34 -07:00
dal c4c7b75306
feat: Update dataset group listing to include permissions
- Enhanced the `list_dataset_groups` function to join with the `dataset_permissions` table, allowing retrieval of permission details for each dataset group.
- Modified the `DatasetGroupInfo` struct to include `permission_id` and `assigned` fields, reflecting the new data structure.
- Refactored the SQL query to group by necessary fields and ensure accurate permission data is returned, improving the functionality and security of dataset group listings.
2025-01-20 15:12:32 -07:00
Nate Kelley 08c9a8e8f4
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-20 15:11:44 -07:00
Nate Kelley 6ba6fd87dd
pass through dataset overview 2025-01-20 15:11:42 -07:00
dal 040bdfbab5
feat: Enhance user attribute listing with authorization checks
- Updated the `list_attributes_handler` to include authorization checks for user roles and organization IDs.
- Implemented error handling for unauthorized access to user attributes.
- Refactored the SQL query to retrieve user attributes based on the authenticated user's organization, improving security and data integrity.
- This change ensures that only authorized users can list attributes, enhancing the overall security of the API.
2025-01-20 14:47:38 -07:00
dal 3bc148927f
feat: Add assets module and nest routes in user router
- Introduced a new `assets` module to handle asset-related routes.
- Updated the user router to nest the `assets` routes under the user ID path, enhancing the organization of API endpoints.
- This change improves the structure and maintainability of the user-related routes in the API.
2025-01-20 14:41:31 -07:00
Nate Kelley bca5055ca9
PRevent clicking passthrough on users click 2025-01-20 14:28:44 -07:00
Nate Kelley fe723a40d3
on change update for segments 2025-01-20 14:26:10 -07:00
Nate Kelley acafc5a025
Merge branch 'staging' into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-20 14:14:11 -07:00
Nate Kelley d2f27d10bf
Merge pull request #53 from buster-so/big-nate/bus-924-make-additional-permissions-pages
Big nate/bus 924 make additional permissions pages
2025-01-20 13:13:31 -08:00
Nate Kelley 177b9cf9eb
add cursor rules for web directory + jest (#52) 2025-01-20 13:11:35 -08:00
dal fdbf24e456
Refactor SQL query in list_assets_handler to use a Common Table Expression (CTE) for improved readability and maintainability. The CTE, `distinct_assets`, simplifies the selection of distinct asset records before applying the final ordering and limiting. 2025-01-20 13:01:02 -07:00
Nate Kelley 7408b72f0c
start user dataset lineage
Co-Authored-By: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-01-17 22:08:21 -07:00
Nate Kelley 165a0e0bad
infinite list component
Co-Authored-By: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-01-17 21:47:29 -07:00
Nate Kelley aad1eb6968
change how padding is applied to list
Co-Authored-By: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-01-17 21:10:49 -07:00
Nate Kelley bf1012cf8b
make pages unique
Co-Authored-By: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-01-17 20:44:59 -07:00
Nate Kelley db7d98ec9a
add additional bulk popup menus
Co-Authored-By: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-01-17 12:12:43 -07:00
Nate Kelley 58fa171a8e
more elegant infinite list component
Co-Authored-By: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-01-17 11:41:18 -07:00
Nate Kelley 221a4a6280
finalize permission popup
Co-Authored-By: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-01-17 10:50:10 -07:00
Nate Kelley 43c96cbb09
Merge branch 'staging' into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-17 09:57:57 -07:00
Nate Kelley 7d83163d78
Big nate/bus 924 make additional permissions pages (#50)
* create virtua list component

* only debounce if there is text

* prefetch on demand

* add a popup for permissions

* Update web/src/components/list/BusterList/BusterListReactWindow.tsx

Co-Authored-By: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-01-17 08:57:24 -08:00
Nate Kelley 48436e5c18
Update web/src/components/list/BusterList/BusterListReactWindow.tsx
Co-Authored-By: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-01-17 09:56:35 -07:00
Nate Kelley 855ca2ee87
Merge branch 'staging' into big-nate/bus-924-make-additional-permissions-pages 2025-01-17 09:52:05 -07:00
Nate Kelley e7f08f9997
Merge branch 'staging' into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-17 09:47:08 -07:00
Nate Kelley 7dd102a06f
Merge branch 'staging' into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-17 09:46:23 -07:00
Nate Kelley e5f8e4fb63
Make users page (#39)
* create users pages

* abstract more components to correct folders

* carve out expection if we are hiding the select all

* user query

* Add ability to change default access

* Update package-lock.json

* Update package-lock.json
2025-01-17 08:46:13 -08:00
Nate Kelley cbaa73046d
update package versions 2025-01-17 09:31:47 -07:00
Nate Kelley 7e9daac477
add a popup for permissions 2025-01-16 17:24:15 -07:00