Skip to content
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

add user limit tracking #1763

Merged
merged 1 commit into from
Jan 7, 2025
Merged

add user limit tracking #1763

merged 1 commit into from
Jan 7, 2025

Conversation

emrgnt-cmplxty
Copy link
Contributor

@emrgnt-cmplxty emrgnt-cmplxty commented Jan 7, 2025

Important

This PR adds user limit tracking by introducing new API endpoints and client methods to fetch user limits, including system defaults, user overrides, and effective settings.

  • API Changes:
    • Added get_user_limits endpoint in users_router.py to fetch user limits, accessible only by the user or superusers.
    • Added get_all_user_limits method in management_service.py to retrieve system defaults, user overrides, and effective limits.
  • Client Changes:
    • Added getLimits method in users.ts and get_limits method in users.py to fetch user limits from the API.
    • Updated BaseClient in base_client.py to store _user_id for authenticated users.
  • Behavior:
    • User limits include system defaults, user overrides, and effective settings.
    • Limits are fetched using the user's ID and require authentication.

This description was created by Ellipsis for 894ac30. It will automatically update as commits are pushed.

@emrgnt-cmplxty emrgnt-cmplxty marked this pull request as ready for review January 7, 2025 03:56
@emrgnt-cmplxty emrgnt-cmplxty merged commit 921c282 into main Jan 7, 2025
3 of 4 checks passed
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 894ac30 in 1 minute and 29 seconds

More details
  • Looked at 353 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. js/sdk/src/v3/clients/users.ts:505
  • Draft comment:
    Consider returning a more specific type instead of any for better type safety and clarity.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The getLimits method in js/sdk/src/v3/clients/users.ts should return a more specific type instead of any for better type safety and clarity.
2. py/sdk/v3/users.py:529
  • Draft comment:
    Consider returning a more specific type instead of dict[str, Any] for better type safety and clarity.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The get_limits method in py/sdk/v3/users.py should return a more specific type instead of dict[str, Any] for better type safety and clarity.

Workflow ID: wflow_sVfvzoW4RwbOCtfj


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant