-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: DIA-2208: add flag to enable legacy tokens from cli #7413
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
Conversation
Add CLI flag and environment variable to enable legacy API token authentication. * Add `--enable-legacy-api-token` flag to `label_studio/core/argparser.py`. * Add `LABEL_STUDIO_ENABLE_LEGACY_API_TOKEN` environment variable to `label_studio/core/settings/base.py`. * Update `docs/source/guide/start.md` to include the new flag and environment variable. * Modify `label_studio/server.py` to enable legacy API tokens if the flag or environment variable is set. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/HumanSignal/label-studio?shareId=XXXX-XXXX-XXXX-XXXX).
…acy API token support * **Argument Parser** - Add `--enable-legacy-api-token` flag to the argument parser in `label_studio/core/argparser.py` * **Settings** - Add `LABEL_STUDIO_ENABLE_LEGACY_API_TOKEN` environment variable in `label_studio/core/settings/base.py` - Set default value to `False` * **Documentation** - Update `docs/source/guide/start.md` to include `--enable-legacy-api-token` and `LABEL_STUDIO_ENABLE_LEGACY_API_TOKEN` * **Organization Functions** - Update `label_studio/organizations/functions.py` to set `legacy_api_tokens_enabled` based on the flag or environment variable * **Server Initialization** - Pass `enable_legacy_api_token` input argument to `create_organization` in `label_studio/server.py`
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: label_studio/server.py
Did you find this useful? React with a 👍 or 👎 |
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for label-studio-docs-new-theme ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for heartex-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #7413 +/- ##
========================================
Coverage 78.37% 78.38%
========================================
Files 193 193
Lines 15613 15616 +3
========================================
+ Hits 12237 12240 +3
Misses 3376 3376
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds a
--enable-legacy-api-token
flag which results in both legacy and JWT tokens to be enabled in the default Organization. Tested locally that without the flag legacy tokens are not enabled, but with the flag they are enabled.Fixes #7355
Based on #7388 , created so that CI can run properly.