feat: Make providers admin-only and enforce RBAC#1736
Draft
edwinjosechittilappilly wants to merge 2 commits into
Draft
feat: Make providers admin-only and enforce RBAC#1736edwinjosechittilappilly wants to merge 2 commits into
edwinjosechittilappilly wants to merge 2 commits into
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| logger.error(f"Failed to get OpenAI models: {str(e)}") | ||
| return JSONResponse({"error": f"Failed to retrieve OpenAI models: {str(e)}"}, status_code=500) | ||
| return JSONResponse( | ||
| {"error": f"Failed to retrieve OpenAI models: {str(e)}"}, status_code=500 |
| logger.error(f"Failed to get Anthropic models: {str(e)}") | ||
| return JSONResponse({"error": f"Failed to retrieve Anthropic models: {str(e)}"}, status_code=500) | ||
| return JSONResponse( | ||
| {"error": f"Failed to retrieve Anthropic models: {str(e)}"}, status_code=500 |
| logger.error(f"Failed to get Ollama models: {str(e)}") | ||
| return JSONResponse({"error": f"Failed to retrieve Ollama models: {str(e)}"}, status_code=500) | ||
| return JSONResponse( | ||
| {"error": f"Failed to retrieve Ollama models: {str(e)}"}, status_code=500 |
9fc6c23 to
86a029a
Compare
Revoke non-admin provider permissions and enforce admin-only provider access across backend and frontend. Adds an Alembic migration (0006_revoke_provider_override_nonadmin) to delete the previously-seeded providers:override:self joins for developer and user roles and updates the DB seed to stop granting provider perms to those roles. Backend: gates provider-related endpoints and v1 APIs behind providers:read / providers:write (and API-key equivalents), redacts the providers section in settings for callers without providers:read, and requires providers:write when updating provider fields. Frontend: avoids polling provider health for non-admins when RBAC is enforced, adds an OnboardingBlocked UI for non-admins when onboarding is required, prevents non-admin access to the Langflow tab (config:write), and waits for permission resolution to avoid flashing the admin wizard.
86a029a to
ae05b12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Revoke non-admin provider permissions and enforce admin-only provider access across backend and frontend. Adds an Alembic migration (0006_revoke_provider_override_nonadmin) to delete the previously-seeded providers:override:self joins for developer and user roles and updates the DB seed to stop granting provider perms to those roles. Backend: gates provider-related endpoints and v1 APIs behind providers:read / providers:write (and API-key equivalents), redacts the providers section in settings for callers without providers:read, and requires providers:write when updating provider fields. Frontend: avoids polling provider health for non-admins when RBAC is enforced, adds an OnboardingBlocked UI for non-admins when onboarding is required, prevents non-admin access to the Langflow tab (config:write), and waits for permission resolution to avoid flashing the admin wizard.