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 support for individual model permissions #1631

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

Conversation

zacps
Copy link
Contributor

@zacps zacps commented Dec 20, 2024

This adds support for restricting individual models based on group membership.

We only wrote support for Microsoft Entra, as it's the only auth provider we use, but it should be simple to add support for other providers in future.

This was rebased from our fork, and I've done some primitive testing, but I may have introduced bugs accidentally.

Credit for the original work goes to @jonstrutz11.

Fixes #1417

jonstrutz11 and others added 4 commits January 6, 2025 13:41
- I originally set APP_BASE to '/' instead of '' because setting cookies
requires the slash and I wanted to reuse the APP_BASE env var when
setting cookies
- However, this seems to cause problems with svelte which doesn't allow
APP_BASE to end in a slash (even if it's just a single slash): see
https://svelte.dev/docs/kit/configuration#paths
- Changed the logic so that APP_BASE can be '' if desired and when
setting cookies, we just set the path to '/' if APP_BASE is ''
@zacps zacps force-pushed the model-permissions-upstream branch from 4d58368 to 1f1c799 Compare January 6, 2025 00:41
@zacps
Copy link
Contributor Author

zacps commented Jan 6, 2025

@nsarrazin This should be ready for review now :)

@nsarrazin nsarrazin self-requested a review January 9, 2025 15:19
@nsarrazin nsarrazin self-assigned this Jan 9, 2025
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.

Support permissions for models (and possibly tools/assistants)
3 participants