Skip to content

PART 2: refactor: leverage polymorphism for unauthenticated access fallback - After #7331#7358

Draft
okurz wants to merge 1 commit into
os-autoinst:masterfrom
okurz:feature/084_none_auth_bootstrap_2
Draft

PART 2: refactor: leverage polymorphism for unauthenticated access fallback - After #7331#7358
okurz wants to merge 1 commit into
os-autoinst:masterfrom
okurz:feature/084_none_auth_bootstrap_2

Conversation

@okurz
Copy link
Copy Markdown
Member

@okurz okurz commented Apr 30, 2026

Motivation:
Avoid hardcoding specific authentication methods like 'None' in core
controllers and helpers.

Design Choices:

  • Introduced 'unauthenticated_user' method in Auth providers.
  • Updated Auth controller and SharedHelpers to use this method if
    present.
  • Moved 'admin' user auto-login logic for 'None' provider into the
    None.pm module.

Benefits:
Cleaner code, better maintainability, and easier to add future providers
with similar unauthenticated access needs.

After:

@okurz okurz changed the title refactor: leverage polymorphism for unauthenticated access fallback PART 2: refactor: leverage polymorphism for unauthenticated access fallback - After #7331 Apr 30, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 89.65517% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.99%. Comparing base (e757eec) to head (c47ff15).
⚠️ Report is 217 commits behind head on master.

Files with missing lines Patch % Lines
lib/OpenQA/Shared/Controller/Auth.pm 75.00% 2 Missing ⚠️
lib/OpenQA/WebAPI/Auth/None.pm 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##            master    #7358      +/-   ##
===========================================
- Coverage   100.00%   99.99%   -0.01%     
===========================================
  Files          419      419              
  Lines        44504    44504              
===========================================
- Hits         44504    44501       -3     
- Misses           0        3       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@okurz okurz force-pushed the feature/084_none_auth_bootstrap_2 branch from c47ff15 to b5109cf Compare May 21, 2026 18:00
Motivation:
Avoid hardcoding specific authentication methods like 'None' in core
controllers and helpers.

Design Choices:
- Introduced 'unauthenticated_user' method in Auth providers.
- Updated Auth controller and SharedHelpers to use this method if
  present.
- Moved 'admin' user auto-login logic for 'None' provider into the
  None.pm module.

Benefits:
Cleaner code, better maintainability, and easier to add future providers
with similar unauthenticated access needs.
@okurz okurz force-pushed the feature/084_none_auth_bootstrap_2 branch from b5109cf to 7d895ca Compare May 25, 2026 07:28
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.

1 participant