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

Updated authlevel in python HTTP template to upper case #4157

Open
wants to merge 1 commit into
base: v4.x
Choose a base branch
from

Conversation

yonahcitron
Copy link

Issue describing the changes in this PR

Fixes #3779

The technical cause of the issue was that value of the '--authlevel' param from the user is first being converted to an AuthorizationLevel enum from the Microsoft.Azure.WebJobs.Extensions.Http package, representing the C# programming model strings.

In the C# programming model, authorization level strings only capitalise the first letter.
In the Python programming model, authorization level strings are entirely upper-case.

Since we are using C# enums, we need to manually convert them to upper-case when making them strings for Python templates.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

…ase when used to generate a python http-template.
@yonahcitron yonahcitron requested a review from a team as a code owner November 11, 2024 17:50
@yonahcitron yonahcitron changed the title Converted the authorization level value passed by the user to upper-c… Updated authlevel in python HTTP template to upper case Nov 11, 2024
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.

Creating Python HTTP template generates wrong value for --authlevel 'anonymous'
1 participant