Skip to content

Fix Project Allowed Operating Systems Not Initialized on Creation - Test Release 2.31 #7966

@KhizerRehan

Description

@KhizerRehan

Summary

Testing scope: Add Project dialog was not initializing the allowed OS settings from admin defaults, effectively bypassing the administrator's policy if the user submitted the form without touching the OS toggles. Accessible via: Dashboard > Projects > Add Project dialog.

Related:

Type of Testing

  • New Feature
  • Bug Fix / Regression
  • UI/UX
  • Performance
  • Upgrade / Migration

Prerequisites

  • Admin user account with access to the Admin Panel to configure allowed operating systems
  • Regular (non-admin) user account to test project creation
  • At least one admin-configured allowed OS setting must be in place before testing (e.g., Ubuntu enabled, Flatcar disabled)

Environment:

  • Provider Specific Setup (If Applicable): Any provider (OS initialization is provider-agnostic at project level)

Test Scenarios

  • Scenario 1: Admin user creates a project — OS restrictions also initialized correctly

    • Steps:
      1. Log in as admin and navigate to Admin Panel > Defaults. Configure allowed operating systems with at least one OS enabled (e.g., Ubuntu enabled, Flatcar disabled).
      2. Log in as a regular user, navigate to Projects, and open the Add Project dialog.
      3. Enter a project name only and submit the form without interacting with any OS toggle.
    • Expected: The created project has the admin-configured OS restrictions applied.
  • Scenario 2: Project created with all OS toggles enabled by admin shows correct OS list

    • Steps:
      1. Configure admin defaults with all available operating systems enabled.
      2. Open the Add Project dialog as a regular user and submit without modifying any toggle.
    • Expected: The newly created project allows all operating systems. No OS is unexpectedly excluded.
  • Scenario 3: User manually changes OS toggles before submitting — custom selection is respected

    • Steps:
      1. Configure admin defaults with Ubuntu and Flatcar enabled.
      2. Open the Add Project dialog, and manually toggle Flatcar off before submitting.
    • Expected: The created project reflects only Ubuntu as the allowed OS, honoring the user's manual override of the default.
  • Scenario 4: Edit Project dialog still shows and saves OS settings correctly after project creation fix

    • Steps:
      1. Create a project using the fixed Add Project dialog (without touching OS toggles).
      2. Open the Edit Project dialog for the newly created project.
      3. Verify the OS toggles are pre-populated and then save with a minor change.
    • Expected: Edit Project dialog shows the correct OS settings inherited at creation. Saving updates them correctly with no regression.
  • Scenario 5: Empty admin default no OS constraints applied when admin has not configured restrictions

    • Steps:
      1. Log in as admin and navigate to Admin Panel > Defaults. Ensure no operating systems are configured or all OS restrictions are cleared/disabled.
      2. Log in as a regular user, navigate to Projects, and open the Add Project dialog.
      3. Enter a project name only and submit the form without interacting with any OS toggle.
    • Expected: The created project is successful with no OS constraints applied. All operating systems are implicitly allowed (unrestricted) for cluster creation within that project.

Screenshots / Attachments

  • Attached in PR

Acceptance Criteria

  • New projects created without touching OS toggles inherit admin-configured allowed OS settings automatically
  • New projects created when admin has no OS defaults configured remain unrestricted and are created successfully
  • The Add Project dialog pre-populates OS toggles to reflect enabled admin defaults when opened
  • Only admin-enabled OS entries are included in the created project; disabled entries are excluded
  • Edit Project dialog continues to load and save OS settings correctly with no regression
  • No console errors during normal Add Project dialog open and submit flow

Milestone

Target Milestone: v2.31

Test Environment

  • Domain: (Currently: Dev)

Metadata

Metadata

Assignees

No one assigned

    Labels

    sig/uiDenotes a PR or issue as being assigned to SIG UI.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions