-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
✨ feat: Implement basic Group Functionality #5934
Open
rubentalstra
wants to merge
17
commits into
main
Choose a base branch
from
feat/user-groups
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+481
−39
Conversation
This file contains 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
Hi @rubentalstra here's the group-based modelspecs filtering feature I developed on my fork: https://github.com/maxesse/LibreChat/tree/feat/group-based-modelspecs-access |
…ser Filtering Logic
1 task
1 task
Updated to use the new |
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.
Summary
This pull request includes significant changes to the group management and OpenID strategy, as well as updates to the client-side model specifications handling. The most important changes include the introduction of group management methods, enhancements to OpenID strategy for group handling, and updates to the client-side model specifications to respect user group permissions.
Group Management Enhancements:
api/models/Group.js
: Added theGroup
model definition using Mongoose.api/models/groupMethods.js
: Implemented methods for creating, updating, finding, and deleting groups, including checks for user assignments and overriding deletions.config/assign-group.js
: Created a script to assign a group to a user via CLI with necessary validations and error handling.config/create-group.js
: Added a script to create a new group with options for local or OpenID group types.OpenID Strategy Enhancements:
api/strategies/openidStrategy.js
: Introduced functions to extract roles from tokens and update user groups based on these roles, integrated into the OpenID strategy setup. [1] [2] [3] [4] [5] [6]api/strategies/openidStrategy.spec.js
: MockedfindGroup
method for testing the OpenID strategy.Client-Side Model Specifications:
client/src/components/Chat/Menus/Models/ModelSpecsMenu.tsx
: Filtered model specifications based on user groups, ensuring only allowed specs are displayed. [1] [2] [3] [4]client/src/components/Chat/Menus/Models/ModelSpec.tsx
: Added support for displaying badges on model specifications.Additional Changes:
api/models/index.js
: Included theGroup
model in the exports. [1] [2]librechat.example.yaml
: Added example configuration for model specifications with group assignments.Change Type
Testing
Test Configuration:
Checklist