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

feat: allows admin to edit assistant actions #4591

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

owengo
Copy link

@owengo owengo commented Oct 30, 2024

Summary

The features allows ADMIN users to edit the actions of assistants, even if they are not the user who created the action.
The authorization is unlocked in the librechat.yaml assistants endpoint section.
The motivation is because admins can actually see all assistants whatever the filtering configured for other users, but they can't intervene with the actions which is rather limiting. The alternative is to modify directly the database to change the assistant 'user' field.

Change Type

Please delete any irrelevant options.

  • [x ] New feature (non-breaking change which adds functionality)
  • [x ] This change requires a documentation update

By default the feature is not activated, it takes effect only when the configuration is enabled in the librechat.yaml configuration.

The PR for the documentation is: LibreChat-AI/librechat.ai#155

Testing

I tested the ability, with an ADMIN user account to see, edit, and delete actions in assistants which were not created by the same account.
When the feature is disabled the ADMIN can see all the assistant but none of their actions.

Test Configuration:

  • have a user with the ADMIN role
  • have an action with the user field not matching the admin user
  • have the endpoints -> assistants -> adminCanEditActions set to true in librechat.yaml
  • verify the admin can see the action on the assistant, edit it and delete it.

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • A pull request for updating the documentation has been submitted.

api/server/routes/agents/actions.js Outdated Show resolved Hide resolved
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.

3 participants