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

misc: Create enum for authorization scopes #1247

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Conversation

adamantike
Copy link
Contributor

Instead of using just strings, this change converts the scopes to a StrEnum, to be compatible with places where a string is expected. This avoids typos when using these scopes, simplifies searching for usages, and improves type hints.

An extra change was the fix to the Firmware download endpoint, which wasn't respecting the DISABLE_DOWNLOAD_ENDPOINT_AUTH flag.

Instead of using just strings, this change converts the scopes to a
`StrEnum`, to be compatible with places where a string is expected. This
avoids typos when using these scopes, simplifies searching for usages,
and improves type hints.

An extra change was the fix to the Firmware download endpoint, which
wasn't respecting the `DISABLE_DOWNLOAD_ENDPOINT_AUTH` flag.
Copy link

Test Results

88 tests  ±0   88 ✅ ±0   26s ⏱️ -1s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit beeb9f0. ± Comparison against base commit fc8cbb7.

@adamantike adamantike merged commit cc20e84 into master Oct 25, 2024
8 checks passed
@adamantike adamantike deleted the misc/scope-enum branch October 25, 2024 03:06
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.

2 participants