-
-
Notifications
You must be signed in to change notification settings - Fork 22.9k
Chore/WorkspaceID Check #5228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore/WorkspaceID Check #5228
Conversation
- Added validation to ensure `activeWorkspaceId` is present in user requests for all API key operations (get, create, update, import, delete). - Updated `getWorkspaceSearchOptions` and `getWorkspaceSearchOptionsFromReq` to throw an error if `workspaceId` is not provided. - Modified service methods to enforce `workspaceId` as a required parameter for database operations related to API keys.
…aces and services - Updated various interfaces to make `workspaceId` a mandatory field instead of optional. - Enhanced assistant and export-import service methods to require `workspaceId` for operations, ensuring proper validation and error handling. - Modified database entity definitions to reflect the change in `workspaceId` from optional to required. - Improved error handling in controllers to check for `activeWorkspaceId` before proceeding with requests.
- Updated controllers for credentials, datasets, document stores, evaluations, evaluators, and variables to enforce the presence of `workspaceId`. - Enhanced error handling to throw appropriate errors when `workspaceId` is not provided. - Modified service methods to accept `workspaceId` as a mandatory parameter for operations, ensuring consistent validation across the application.
… retrieval - Modified the runAdditionalEvaluators function to accept workspaceId as a parameter.
- Updated chatflow and flow-config controllers to require workspaceId for fetching chatflows. - Modified service methods to accept workspaceId as a parameter, ensuring proper context for chatflow retrieval.
- Enhanced permission checks in chatflows routes to include agentflows permissions for create, read, update, and delete operations. - Updated navigation paths in authentication views to redirect to the home page instead of chatflows after successful login or registration.
|
lgtm. |
| { path: '/login-activity', permission: 'loginActivity:view', display: 'feat:login-activity' }, | ||
| // Other routes | ||
| { path: '/logs', permission: 'logs:view', display: 'feat:logs' }, | ||
| { path: '/account', display: 'feat:account' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this expected to not have any permission for /account?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no specific account permission in Permissions.ts
…as-changed/:id/:lastUpdatedDateTime
Commits
DescriptionReplaced Result
|
…uest chatflow/:id
… in generateTextToSpeech
…l and validation using workspaceId
Commit
DescriptionImplementing proper workspace isolation. Result
|
…eleteCustomTemplate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: The following items will be addressed in separate PRs:
- Migration script for all DB platforms to make the
workspaceIdcolumn not null. - Implement granular permissions for the API Key.
- Generalize error handling in the UI to include error number codes along with friendlier error messages.
- Return the correct HTTP status codes.



















No description provided.