Commit Graph

1399 Commits

Author SHA1 Message Date
Nate Kelley d17899f3d4
toggle for metric slideout 2025-02-03 10:31:15 -07:00
Nate Kelley 4ca917195c
additinal typing 2025-02-03 09:33:02 -07:00
Nate Kelley 45f814ff04
change how dashboards are routed 2025-02-03 09:26:40 -07:00
Nate Kelley 40d4532788
move permission to asset interfaces 2025-02-01 21:53:01 -07:00
Nate Kelley d2e7c65ca4
move addtional files to asset 2025-02-01 21:27:54 -07:00
Nate Kelley 4cee544cf3
move dataset to shared asset 2025-02-01 20:59:24 -07:00
Nate Kelley 90fac0a5c7
Start removing thread context 2025-01-31 22:33:57 -07:00
Nate Kelley 58551de620
start moving api interfaces to folder 2025-01-31 11:09:11 -07:00
Nate Kelley 731969aa49
Merge branch 'staging' into big-nate/bus-939-create-new-structure-for-chats 2025-01-30 17:16:39 -07:00
Nate Kelley 5b231e1efd
make dashboard header sizing more consistent 2025-01-30 17:16:19 -07:00
Nate Kelley 337569fd9c
remove some requests 2025-01-30 16:56:08 -07:00
Nate Kelley 17c57f6d75
metric interfaces in correct place 2025-01-30 16:53:57 -07:00
Nate Kelley 22337e17d1
share menu structures 2025-01-30 16:51:37 -07:00
Nate Kelley 70d770f565
add additional components 2025-01-30 15:33:06 -07:00
Nate Kelley f234825029
add chat layout context 2025-01-30 10:44:37 -07:00
Nate Kelley 7d7e637d50
update animation 2025-01-29 15:10:41 -07:00
Nate Kelley 36965ca1fe
Merge branch 'staging' into big-nate/bus-939-create-new-structure-for-chats 2025-01-29 14:55:43 -07:00
Nate Kelley 64971b7267
fix(posthog): update posthog config 2025-01-29 14:54:49 -07:00
Nate Kelley 9d5ed6b10f
Update ChatResponseMessages.tsx 2025-01-29 14:51:19 -07:00
Nate Kelley ce4d061325
add additional animation 2025-01-29 13:58:27 -07:00
Nate Kelley 372e394100
smoother hide transntion 2025-01-29 13:11:37 -07:00
Nate Kelley 97316c11cc
Merge branch 'staging' into big-nate/bus-939-create-new-structure-for-chats 2025-01-29 12:47:31 -07:00
Nate Kelley 4bade2114a
attempt to fix cursor bug 2025-01-29 12:46:26 -07:00
Nate Kelley 284dd43369
remove warning for show undefeine 2025-01-29 12:17:16 -07:00
Nate Kelley 01cbc70cd6
replace missing data with logic update 2025-01-29 11:32:38 -07:00
Nate Kelley 75e36b8e93
replace missing data with 2025-01-29 10:35:34 -07:00
Nate Kelley cce49d7d95
Update createServerInstance.ts 2025-01-29 09:45:19 -07:00
Nate Kelley dc152628f0
hidden items 2025-01-28 17:12:23 -07:00
Nate Kelley 44df60c695
chat content update 2025-01-28 16:21:00 -07:00
Nate Kelley f686403141
do not show next line 2025-01-28 15:54:41 -07:00
Nate Kelley 2a881479ee
message updated 2025-01-28 15:38:43 -07:00
Nate Kelley 330c3067d5
version id update 2025-01-28 15:21:07 -07:00
Nate Kelley 29b2c8996f
bleed into message block 2025-01-28 14:21:22 -07:00
Nate Kelley f41c4da9ff
thought transitions complete 2025-01-28 14:07:30 -07:00
Nate Kelley 2d8d2baa6f
Update ChatResponseMessage_ThoughtPills.tsx 2025-01-28 13:29:07 -07:00
Nate Kelley e653d3953b
better pill handling 2025-01-28 12:55:53 -07:00
Nate Kelley b850a85199
width 2025-01-28 12:47:14 -07:00
Nate Kelley df3c216b3e
pill click events 2025-01-28 12:24:31 -07:00
Nate Kelley aec79d84a6
thoughts pills 2025-01-28 11:50:11 -07:00
Nate Kelley 52c4521750
pill styles 2025-01-28 10:57:26 -07:00
Nate Kelley b8e1270f36
Update ChatResponseMessage_Thought.tsx 2025-01-28 10:07:37 -07:00
Nate Kelley 975b8dd8d9
add streaming text 2025-01-28 10:04:54 -07:00
Nate Kelley 20c31af9da
started adding responses 2025-01-27 17:08:52 -07:00
Nate Kelley 90d30c93af
add additional context provider for chats 2025-01-27 16:23:08 -07:00
Nate Kelley be050b3521
select file update 2025-01-27 15:48:29 -07:00
Nate Kelley d5ee691de4
add provider for chats 2025-01-27 14:20:26 -07:00
Nate Kelley 604bfbdd6c
create chat interfaces 2025-01-27 13:21:42 -07:00
Nate Kelley 9f4dcb6baa
animation for collapse button 2025-01-25 11:23:19 -07:00
Nate Kelley d7aeb14569
pass down file type to container 2025-01-24 21:21:53 -07:00
dal 39dfc053fc
Merge branch 'main' into staging 2025-01-24 16:07:02 -08:00
Nate Kelley b3af7267ef
default file passthrough 2025-01-24 16:59:38 -07:00
Nate Kelley de0d46bb2e
more chat container info 2025-01-24 16:33:32 -07:00
Nate Kelley 2068cf2046
add scroll indicator 2025-01-24 14:39:15 -07:00
Nate Kelley 8b21e0d50c
chat file headers 2025-01-24 13:36:39 -07:00
Nate Kelley 2fe395b5ea
check if number for chat splitter 2025-01-24 13:05:09 -07:00
Nate Kelley ff81539cb9
Use performance instead of settimeout for splitter animation 2025-01-24 11:14:49 -07:00
Nate Kelley 975f5a1011
Merge branch 'staging' into big-nate/bus-939-create-new-structure-for-chats 2025-01-24 11:12:12 -07:00
Nate Kelley 2208977a87
prevent email param injection 2025-01-24 11:04:34 -07:00
Nate Kelley 62ce1b8c9c
Update cspPolicyMiddleware.ts 2025-01-24 10:50:17 -07:00
Nate Kelley 4000bb4e06
add csp policy middleware 2025-01-24 10:19:53 -07:00
dal 98aff93fba
chore: add release-please configuration
* chore: add release-please configuration

* create virtua list component

* only debounce if there is text

* prefetch on demand

* add a popup for permissions

* update package versions

* 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

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

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

* 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>

* finalize permission popup

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

* more elegant infinite list component

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

* add additional bulk popup menus

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

* make pages unique

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

* change how padding is applied to list

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

* infinite list component

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

* start user dataset lineage

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

* 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.

* add cursor rules for web directory + jest (#52)

* on change update for segments

* PRevent clicking passthrough on users click

* 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.

* 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.

* pass through dataset overview

* 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.

* 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.

* add component for users inputs

* 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.

* 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.

* 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.

* normalize header for list

* new line

* popup conatiner for users

* 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.

* pass last child as index

* 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.

* 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.

* onchagne appsegmetned update

* create permission user endpoints

* move files to match new page structure

* 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.

* 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.

* 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.

* 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.

* add list components for permission settings

* 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.

* create permission group users

* 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.

* add listing for dataset groups

* 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.

* add listing for dataset groups

* add list for datasets

* assigned permissions

* Add attributes and teams

* 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.

* invalidate query if user id is present

* create a dataset modal added to user page

* add team modal to teams

* assigned popup

* 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.

* 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.

* lineage props passed

* 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.

* 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.

* add datasetgroup handler

* 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.

* clickable pills

* fix build errors

* add endpoints for dataset groups, and permission groups

* 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.

* better handling for create a permission group

* Refetch on team created for now

* add additional pages

* permission group modal update

* added pages for permission groups

* add user permission list

* add datasets to permission groups page

* 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.

* add datasets to permission groups page

* 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.

* add permission groups lists

* add dataset group in permission group area

* remove console logs

* Big nate/bus 936 if a user is not an admin we should not see the permission (#57)

* app sidebar settings should hide

* rename api directories

* list empty state

* offset for row

* refetch after user default access changed (#58)

* fix permission check on post_dataset rest

* refactor: enhance dataset overview access lineage and permission checks

- Updated the `get_dataset_overview` function to conditionally add default access lineage based on user roles and existing access paths.
- Simplified the logic for adding user roles to the lineage, ensuring clarity and maintainability.
- Improved handling for the `RestrictedQuerier` role to include checks for existing access before adding default lineage, enhancing permission accuracy.
- Streamlined code by removing redundant checks and consolidating role handling, optimizing overall readability.

* feat: Enhance permission group handling and data retrieval

- Introduced a new `PermissionGroupInfo` struct to encapsulate detailed information about permission groups, including user and dataset counts.
- Updated the `get_permission_group` and `list_permission_groups` functions to improve data retrieval and error handling.
- Refactored SQL queries in `list_permission_groups` to include additional joins for counting users and datasets associated with permission groups, enhancing the overall functionality and clarity of the API.
- Streamlined code for better readability and maintainability, ensuring consistent handling of user and permission group data.

* check if user has an org first

* user organization can be null

* get datasets only if they have an org

* refactor: Improve dataset access handling and permission checks

- Enhanced the `get_restricted_user_datasets` and `get_restricted_user_datasets_with_metadata` functions to include additional permission checks for dataset groups and permission groups.
- Consolidated SQL queries to ensure proper filtering of deleted records and improved clarity in dataset retrieval logic.
- Introduced new joins and filters to handle dataset group permissions, ensuring accurate access control for users.
- Streamlined code for better readability and maintainability, enhancing overall functionality in dataset access management.

* add hidden prop to row listing component

* reroute to correct link for datasets

* disable editing my own user

* restrict certain routes to admins

* small users page

* restrict adding people to admins

* update packages

* Update shimmer text component

* Update ShimmerText.tsx

* update how no datasets is presented

* fix permission check on post_dataset rest (#59)

* fix permission check on post_dataset rest

* refactor: enhance dataset overview access lineage and permission checks

- Updated the `get_dataset_overview` function to conditionally add default access lineage based on user roles and existing access paths.
- Simplified the logic for adding user roles to the lineage, ensuring clarity and maintainability.
- Improved handling for the `RestrictedQuerier` role to include checks for existing access before adding default lineage, enhancing permission accuracy.
- Streamlined code by removing redundant checks and consolidating role handling, optimizing overall readability.

* feat: Enhance permission group handling and data retrieval

- Introduced a new `PermissionGroupInfo` struct to encapsulate detailed information about permission groups, including user and dataset counts.
- Updated the `get_permission_group` and `list_permission_groups` functions to improve data retrieval and error handling.
- Refactored SQL queries in `list_permission_groups` to include additional joins for counting users and datasets associated with permission groups, enhancing the overall functionality and clarity of the API.
- Streamlined code for better readability and maintainability, ensuring consistent handling of user and permission group data.

* refactor: Improve dataset access handling and permission checks

- Enhanced the `get_restricted_user_datasets` and `get_restricted_user_datasets_with_metadata` functions to include additional permission checks for dataset groups and permission groups.
- Consolidated SQL queries to ensure proper filtering of deleted records and improved clarity in dataset retrieval logic.
- Introduced new joins and filters to handle dataset group permissions, ensuring accurate access control for users.
- Streamlined code for better readability and maintainability, enhancing overall functionality in dataset access management.

* fix: Update SQL migration and seed data for user attributes

- Modified the SQL migration to specify the schema for the `users` table, ensuring clarity in the update statement.
- Adjusted the seed data for `users_to_organizations` to change the `organization_id` from 'public' to 'none', reflecting a more accurate state for user roles and organization associations.
- Ensured consistency in the formatting of SQL insert statements for better readability.

* fix: Prevent users from updating their own profiles

- Added a check in the `update_user_handler` to prevent users from updating their own information, returning an error if they attempt to do so.
- This change enhances security by ensuring that users cannot modify their own records, which could lead to unauthorized changes.

* refactor: Simplify dashboard permission queries by removing team-based joins

- Removed left joins with `teams_to_users` table in dashboard permission queries
- Simplified permission checks to only filter by direct user ID
- Updated queries in `get_user_dashboard_permission`, `get_bulk_user_dashboard_permission`, and `list_dashboards_handler`
- Streamlined SQL query logic for more direct and efficient permission checks

* add secure middleware checks

* Update supabase server to secure and http only

* dashboard permissions fix

* set cookies

* set cookies

* Enhance email functionality by adding HTML escaping

- Added `html-escape` crate to `Cargo.toml` for HTML escaping.
- Updated email template processing to escape HTML in message and button text, preventing potential XSS vulnerabilities.
- Modified test cases to include HTML content in email parameters, ensuring proper handling and escaping.

This change improves security by sanitizing user input in email communications.

---------

Co-authored-by: Nate Kelley <nate@buster.so>
Co-authored-by: Nate Kelley <133379588+nate-kelley-buster@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-01-24 08:11:11 -08:00
Nate Kelley d39373ac18
Merge branch 'staging' into nate/security-remediation 2025-01-23 17:07:06 -07:00
Nate Kelley 50b9177275
set cookies 2025-01-23 17:06:12 -07:00
Nate Kelley 504a3360b6
set cookies 2025-01-23 17:01:52 -07:00
Nate Kelley 02d0f9f2c4
Update supabase server to secure and http only 2025-01-23 16:37:44 -07:00
Nate Kelley 15e515720f
add secure middleware checks 2025-01-23 16:33:33 -07:00
Nate Kelley 77c6f57846
can pass in pixels instead of percentage to app splitter animate 2025-01-23 16:15:42 -07:00
Nate Kelley dbaa3c0b06
add chat splitter pt 1 2025-01-23 16:00:33 -07:00
Nate Kelley f638db2299
reorganize components pt 1 2025-01-23 13:15:10 -07:00
Nate Kelley 31e0477b56
Merge branch 'staging' into big-nate/bus-939-create-new-structure-for-chats 2025-01-23 12:58:08 -07:00
Nate Kelley d315d6f410
update how no datasets is presented 2025-01-23 12:57:57 -07:00
Nate Kelley c91647198d
memoize impertative function 2025-01-23 12:57:37 -07:00
Nate Kelley 16866accbb
Merge branch 'staging' into big-nate/bus-939-create-new-structure-for-chats 2025-01-23 12:44:41 -07:00
Nate Kelley 4a52fa6ddd
Update ShimmerText.tsx 2025-01-23 12:40:13 -07:00
Nate Kelley cb2d3c3235
Merge branch 'staging' of https://github.com/buster-so/buster into staging 2025-01-23 12:39:59 -07:00
Nate Kelley ab8ae7f3d2
Update shimmer text component 2025-01-23 11:56:57 -07:00
Nate Kelley 10ee4acdd8
update packages 2025-01-23 11:43:28 -07:00
Nate Kelley 0a7ffc7980
restrict adding people to admins 2025-01-23 11:36:54 -07:00
Nate Kelley cb96002f04
small users page 2025-01-23 11:32:02 -07:00
Nate Kelley 4de70a3420
restrict certain routes to admins 2025-01-23 11:20:48 -07:00
Nate Kelley aa190a73de
disable editing my own user 2025-01-23 11:05:07 -07:00
Nate Kelley b658eb2728
reroute to correct link for datasets 2025-01-23 10:54:21 -07:00
Nate Kelley ac0caac99b
add hidden prop to row listing component 2025-01-23 10:20:23 -07:00
Nate Kelley 237bf529e2
get datasets only if they have an org 2025-01-23 10:05:52 -07:00
Nate Kelley f07d5425b9
user organization can be null 2025-01-23 09:29:07 -07:00
Nate Kelley de85b20627
check if user has an org first 2025-01-23 09:26:23 -07:00
Nate Kelley 77184a4f49
Update AppSplitter.tsx 2025-01-22 17:53:29 -07:00
Nate Kelley 0ef19744d7
Update AppSplitter.tsx 2025-01-22 17:35:39 -07:00
Nate Kelley b45eec6146
add animation to app splitter 2025-01-22 17:35:17 -07:00
Nate Kelley db43289d71
refetch after user default access changed (#58) 2025-01-22 15:11:07 -08:00
Nate Kelley bc36758fea
Big nate/bus 936 if a user is not an admin we should not see the permission (#57)
* app sidebar settings should hide

* rename api directories

* list empty state

* offset for row
2025-01-22 14:58:06 -08:00
dal dc0dd9aa30
Merge branch 'main' into staging 2025-01-22 13:30:49 -07:00
Nate Kelley 5c75fbee03
remove console logs 2025-01-22 12:51:56 -07:00
Nate Kelley 84387396f0
feat: added permission pages
* chore: add release-please configuration

* create virtua list component

* only debounce if there is text

* prefetch on demand

* add a popup for permissions

* update package versions

* 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

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

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

* 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>

* finalize permission popup

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

* more elegant infinite list component

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

* add additional bulk popup menus

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

* make pages unique

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

* change how padding is applied to list

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

* infinite list component

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

* start user dataset lineage

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

* 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.

* add cursor rules for web directory + jest (#52)

* on change update for segments

* PRevent clicking passthrough on users click

* 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.

* 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.

* pass through dataset overview

* 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.

* 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.

* add component for users inputs

* 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.

* 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.

* 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.

* normalize header for list

* new line

* popup conatiner for users

* 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.

* pass last child as index

* 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.

* 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.

* onchagne appsegmetned update

* create permission user endpoints

* move files to match new page structure

* 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.

* 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.

* 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.

* 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.

* add list components for permission settings

* 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.

* create permission group users

* 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.

* add listing for dataset groups

* 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.

* add listing for dataset groups

* add list for datasets

* assigned permissions

* Add attributes and teams

* 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.

* invalidate query if user id is present

* create a dataset modal added to user page

* add team modal to teams

* assigned popup

* 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.

* 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.

* lineage props passed

* 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.

* 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.

* add datasetgroup handler

* 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.

* clickable pills

* fix build errors

* add endpoints for dataset groups, and permission groups

* 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.

* better handling for create a permission group

* Refetch on team created for now

* add additional pages

* permission group modal update

* added pages for permission groups

* add user permission list

* add datasets to permission groups page

* 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.

* add datasets to permission groups page

* 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.

* add permission groups lists

* add dataset group in permission group area

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: dal <dallin@buster.so>
2025-01-22 11:25:06 -08:00
Nate Kelley 0e4f6e7f06
add dataset group in permission group area 2025-01-22 12:08:53 -07:00
Nate Kelley 0d132576d5
add permission groups lists 2025-01-22 11:06:05 -07:00
Nate Kelley aba1cef762
add datasets to permission groups page 2025-01-22 10:32:28 -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 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
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 d9c72f2ac4
clickable pills 2025-01-21 16:14:15 -07:00
Nate Kelley 67bc9bf002
add datasetgroup handler 2025-01-21 16:08:22 -07:00
Nate Kelley 3293a02a0b
lineage props passed 2025-01-21 15:46:12 -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 2273892fad
invalidate query if user id is present 2025-01-21 12:01:33 -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 dccd1ee345
add listing for dataset groups 2025-01-21 11:17:55 -07:00
Nate Kelley 0381c9b04a
add listing for dataset groups 2025-01-21 11:06:37 -07:00
Nate Kelley 1c94f2ffd2
create permission group users 2025-01-21 10:45:05 -07:00
Nate Kelley 2be23179e1
add list components for permission settings 2025-01-21 10:23:44 -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 64ebeddb6e
onchagne appsegmetned update 2025-01-20 17:01:10 -07:00
Nate Kelley db4188a410
pass last child as index 2025-01-20 16:37:16 -07:00
Nate Kelley e1a23a0656
popup conatiner for users 2025-01-20 16:11:49 -07:00
Nate Kelley 5d8a3a3337
normalize header for list 2025-01-20 16:08:08 -07:00
Nate Kelley 1d93aff922
add component for users inputs 2025-01-20 15:34:09 -07:00
Nate Kelley 6ba6fd87dd
pass through dataset overview 2025-01-20 15:11:42 -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 177b9cf9eb
add cursor rules for web directory + jest (#52) 2025-01-20 13:11:35 -08: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 e7f08f9997
Merge branch 'staging' into dallin/bus-920-feature-finish-rest-of-permissions 2025-01-17 09:47:08 -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 f1ee35b890
chore: add semvar version update (#42)
* added empty state text

* update permission group in the dataset

* Enhance dataset asset listing with organization-specific filtering

- Updated the `list_assets` function to include organization ID filtering in dataset permissions queries.
- Removed redundant organization ID filters from the dataset permissions queries to streamline the logic.
- Ensured that only relevant dataset assets are returned based on the user's organization, improving data security and relevance.

These changes enhance the API's ability to serve organization-specific data, aligning with recent improvements in dataset asset APIs.

* containerized class should be white with no border at bottom

* clear query when signing out

* Use correct endpoint for dataset groups

* yaml syntax highligting

* create dataset endpoints

* update disable logic for deploying a dataset

* Refactor user routes to include new endpoint for retrieving user by ID

- Removed the public modifier from `get_user` and `update_user` modules to encapsulate them within the module.
- Added a new route to the user router for fetching a user by their ID, enhancing the API's functionality.
- This change improves the user management capabilities by allowing retrieval of specific user details based on their unique identifier.

* Add organizations module and integrate with user routes

* remove unused imports and abstract variables

* Refactor user update functionality to support role changes

- Enhanced the `update_user` endpoint to accept and process user role updates alongside name changes.
- Introduced a new `UserResponse` struct for improved response handling.
- Updated the `update_user_handler` to handle changes in both user name and organization role, improving the flexibility of user management.
- Adjusted response type to return no content upon successful updates, aligning with RESTful practices.

These changes enhance the user management capabilities by allowing for more comprehensive updates to user information.

* Update user route to use ID parameter for updates

- Changed the user update route to require a user ID in the URL, enhancing RESTful practices.
- Updated the `update_user` function to extract the user ID from the path, ensuring the correct user is updated based on the provided ID.

These changes improve the clarity and functionality of the user update endpoint, aligning it with standard REST conventions.

* simplify hooks imports

* Remove unused component

* restructure folders for layout

* update imports for gloabl components

* add additional routes

* Implement user permission checks in dataset deployment and user update routes

- Added permission validation to the `deploy_datasets` and `post_dataset` functions to ensure only users with workspace admin or data admin roles can execute these actions.
- Enhanced error handling for permission checks, returning appropriate HTTP status codes and messages for insufficient permissions and internal errors.
- Updated imports to include the new security checks module for consistency across routes.

These changes improve security by enforcing role-based access control in critical dataset operations.

* Refactor user update route to enhance RESTful practices

- Updated the user update route to require a user ID in the URL, ensuring the correct user is updated based on the provided ID.
- Improved clarity and functionality of the `update_user` function by extracting the user ID from the path.

These changes align the user update endpoint with standard REST conventions, enhancing overall API usability.

* Enhance dataset listing functionality with user organization roles

- Refactored dataset listing logic to incorporate user organization roles, allowing for more granular access control based on user permissions.
- Introduced new role checks for `WorkspaceAdmin`, `DataAdmin`, `Querier`, `RestrictedQuerier`, and `Viewer` to determine dataset visibility.
- Updated database queries to fetch datasets based on user roles and organization associations, improving data retrieval efficiency.
- Removed deprecated functions and streamlined the dataset fetching process, ensuring clarity and maintainability in the codebase.

These changes improve the API's security and usability by enforcing role-based access control for dataset operations.

* tweaked the post thread permissions handle.

* permission_group string fix

* remove package.json

* fix: Add release please syntax handler and github action (#40)

* fix(buster): Add release please syntax handler and github action

* chore: add version tracking setup

fix: update

update nate rulez

---------

Co-authored-by: dal <dallin@buster.so>
2025-01-16 11:02:12 -08:00
Nate Kelley ea23904b92
remove package.json 2025-01-16 10:53:23 -07:00
dal 7b110a941c
Merge pull request #38 from buster-so/nate/BUS-918-consolidate-and-cleanup-imports
Consolidate and cleanup imports
2025-01-16 07:37:14 -08:00
Nate Kelley d8594d19d0
add additional routes 2025-01-15 12:20:45 -07:00
Nate Kelley 447ae12478
update imports for gloabl components 2025-01-15 12:03:18 -07:00
Nate Kelley fb68215330
Merge branch 'staging' into nate/BUS-918-consolidate-and-cleanup-imports 2025-01-15 11:52:17 -07:00
Nate Kelley f116c6a606
restructure folders for layout 2025-01-15 11:51:59 -07:00
Nate Kelley 588604c326
Remove unused component 2025-01-15 11:42:18 -07:00
Nate Kelley 1d340b214d
simplify hooks imports 2025-01-15 11:31:14 -07:00
Nate Kelley 2443ae688a
remove unused imports and abstract variables 2025-01-15 11:04:29 -07:00
Nate Kelley 58dc72b9ef
update disable logic for deploying a dataset 2025-01-14 13:04:24 -07:00
Nate Kelley 2812df14a1
create dataset endpoints 2025-01-14 12:53:54 -07:00
Nate Kelley 3104cace3c
yaml syntax highligting 2025-01-14 12:37:59 -07:00
Nate Kelley d893eee231
Use correct endpoint for dataset groups 2025-01-14 11:25:29 -07:00
Nate Kelley 97fcc9de04
clear query when signing out 2025-01-14 11:12:13 -07:00
Nate Kelley 6b0c516500
containerized class should be white with no border at bottom 2025-01-14 11:09:56 -07:00
Nate Kelley 307e4bbaf6
update permission group in the dataset 2025-01-14 10:56:05 -07:00
Nate Kelley 8887aa10dc
added empty state text 2025-01-14 09:08:21 -07:00
Nate Kelley 02fe9901df
remove unused dataset code 2025-01-10 20:53:21 -07:00
Nate Kelley 4696c10217
add user permission page 2025-01-10 16:36:15 -07:00
Nate Kelley 3c0d4366e9
dataset groups page 2025-01-10 15:54:39 -07:00
Nate Kelley bc5598c355
Create permission groups 2025-01-10 15:23:01 -07:00
Nate Kelley 1671c2d8fb
optimistic updates for assigning permission groups 2025-01-10 14:50:44 -07:00
Nate Kelley ae689150b3
search through lineage users 2025-01-10 13:38:39 -07:00
Nate Kelley ab3d205f6d
add loading indicator for fetching temp data 2025-01-10 11:03:14 -07:00
Nate Kelley c6de0e5bc8
Merge branch 'staging' into big-nate/bus-891-reorganize-and-redo-permissions-tabs 2025-01-10 10:33:49 -07:00
Nate Kelley 8f9b9aa8c0
Update ChartJSTheme.ts 2025-01-10 10:28:42 -07:00
Nate Kelley d96cb9ba68
querys for permissions 2025-01-10 10:05:38 -07:00
Nate Kelley ddaf4e9347
Run SQL response in a rest endpoint 2025-01-10 09:06:27 -07:00
Nate Kelley 586c2a98ec
Add meta data page 2025-01-09 16:03:27 -07:00
Nate Kelley 660bc1814e
server side rendering for 2025-01-09 15:41:57 -07:00
Nate Kelley 48b9fc2d81
Loading data updates 2025-01-09 14:00:40 -07:00
Nate Kelley 9e3a5088ed
Data grid is now in sql 2025-01-09 12:04:57 -07:00
Nate Kelley 9b7adb0102
fetch data functions updated 2025-01-09 10:42:16 -07:00
Nate Kelley d3946c27f8
add create endpoints 2025-01-09 10:30:15 -07:00
Nate Kelley a5dba50a4c
New endpoints for datasets 2025-01-09 09:46:16 -07:00
Nate Kelley 2663090d3b
Create dataset overview page 2025-01-08 17:32:55 -07:00
dal 62c7f1aabb
Merge pull request #24 from buster-so/dal/apis-for-permissions
Dal/apis-for-permissions
2025-01-08 15:53:59 -08:00
Nate Kelley 166afbea2b
updated header to match new format 2025-01-08 16:21:58 -07:00
Nate Kelley 7378a7b115
remove test pages 2025-01-08 16:05:15 -07:00
Nate Kelley 4dc10c3101
list dataset is in a react query 2025-01-08 16:02:41 -07:00
Nate Kelley 6d91a2202a
remove users and permission pages 2025-01-08 14:47:45 -07:00
Nate Kelley 20e3d75bb7
Merge remote-tracking branch 'origin/dal/apis-for-permissions' into big-nate/bus-891-reorganize-and-redo-permissions-tabs 2025-01-08 14:13:47 -07:00
Nate Kelley 583df005fa
Merge branch 'nate/docker-passthrough' into big-nate/bus-891-reorganize-and-redo-permissions-tabs 2025-01-08 14:11:21 -07:00
Nate Kelley 015cf056ba
Merge branch 'staging' into big-nate/bus-891-reorganize-and-redo-permissions-tabs 2025-01-08 14:08:55 -07:00
Nate Kelley a4a03acb42
Pass env to dockerfiles 2025-01-08 14:03:27 -07:00
dal d03815a02c Update database seed data and API routes for enhanced role management
- Changed the role of a user in the teams_to_users table from 'admin' to 'manager' for better role clarity.
- Refactored the users_to_organizations table to include a new 'status' field and updated multiple user roles to align with the new role structure (workspace_admin, querier, data_admin).
- Added a new permission_groups module to the API routes for improved permission management.
- Updated the security module to include a new checks module for enhanced security handling.
- Integrated dotenv in the Next.js configuration to manage environment variables more effectively.

These changes improve the clarity and functionality of user roles and permissions within the application.
2025-01-08 12:35:48 -07:00
Nate Kelley 541942f65f paginated query 2025-01-08 09:23:45 -07:00
dal a2ab3cb641 Remove package-lock.json and update Docker Compose commands for Redis integration
- Deleted the `package-lock.json` file from the root directory.
- Modified the `dev` target in the API Makefile to start Redis using Docker Compose from the parent directory, improving service orchestration.
- Updated the `next.config.mjs` to load environment variables from the parent directory during development.
- Added `dotenv` as a dependency in both `package.json` and `package-lock.json` to manage environment variables effectively.

These changes streamline the development setup and enhance the management of environment variables.
2025-01-07 22:44:13 -07:00
dal 4679adf04a Refactor Docker Compose and API configuration for improved service management
- Consolidated Redis service into the main `docker-compose.yml`, removing the separate API Docker Compose file.
- Added health checks for Redis and API services to ensure proper service readiness.
- Updated API router to include a public health check endpoint.
- Cleaned up the web Dockerfile by removing unnecessary environment variable copying.

These changes enhance service orchestration and improve the reliability of the application during development.
2025-01-07 16:20:59 -07:00
Nate Kelley 5f612fbcf7 dockerfile for web 2025-01-07 15:35:18 -07:00
Nate Kelley 5c20841bc1
Nate/general intergration testing (#17)
* pass width in different selectors

* tooltip updates

* add ability to disable tooltip

* pie minimum percentage must be passed down to legend update

* axis title must be truncated

* update to scatter with a

* scatter tooltip update

* scatter tooltip updates
2025-01-07 13:42:00 -08:00
Nate Kelley a30b102878 Update .gitignore
Update config.ts

Update config.ts
2025-01-06 13:45:11 -07:00
Nate Kelley 60558408b9 change access token 2025-01-06 13:04:55 -07:00
Nate Kelley fd45d11780 update prettier files 2025-01-06 12:43:40 -07:00
Nate Kelley 0302fb9a0c Initial web commit 🤙
Initial commit for all files and folder related to the web project
2025-01-06 11:29:29 -07:00