Skip to content

[dotnet] [bidi] Fix namespace for Permissions module#16981

Merged
nvborisenko merged 2 commits intoSeleniumHQ:trunkfrom
nvborisenko:bidi-fix-permissions-module
Jan 23, 2026
Merged

[dotnet] [bidi] Fix namespace for Permissions module#16981
nvborisenko merged 2 commits intoSeleniumHQ:trunkfrom
nvborisenko:bidi-fix-permissions-module

Conversation

@nvborisenko
Copy link
Member

@nvborisenko nvborisenko commented Jan 22, 2026

User description

This pull request makes minor changes to the Permissions module in the .NET WebDriver BiDi implementation, primarily focusing on namespace corrections and class declaration improvements.

💥 What does this PR do?

  • Namespace corrections:

    • Changed the namespace of PermissionsModule from OpenQA.Selenium.BiDi.Extensions.Permissions to OpenQA.Selenium.BiDi.Permissions for consistency.
    • Removed an unnecessary using directive for OpenQA.Selenium.BiDi.Extensions.Permissions in PermissionsBiDiExtensions.cs.
  • Class declaration improvement:

    • Made the PermissionsModule class sealed to prevent inheritance, clarifying its intended usage.

🔄 Types of changes

  • Cleanup (formatting, renaming)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR Type

Bug fix, Enhancement


Description

  • Fix namespace for PermissionsModule from Extensions.Permissions to Permissions

  • Remove unnecessary using directive for old namespace

  • Make PermissionsModule class sealed to prevent inheritance


Diagram Walkthrough

flowchart LR
  A["PermissionsModule<br/>Old namespace"] -- "namespace correction" --> B["PermissionsModule<br/>New namespace"]
  C["using directive<br/>Extensions.Permissions"] -- "removed" --> D["Clean imports"]
  E["public class<br/>PermissionsModule"] -- "sealed" --> F["sealed class<br/>PermissionsModule"]
Loading

File Walkthrough

Relevant files
Cleanup
PermissionsBiDiExtensions.cs
Remove outdated namespace import                                                 

dotnet/src/webdriver/BiDi/Permissions/PermissionsBiDiExtensions.cs

  • Removed unnecessary using OpenQA.Selenium.BiDi.Extensions.Permissions
    directive
  • Namespace declaration remains OpenQA.Selenium.BiDi.Permissions
+0/-1     
Bug fix
PermissionsModule.cs
Fix namespace and seal PermissionsModule class                     

dotnet/src/webdriver/BiDi/Permissions/PermissionsModule.cs

  • Changed namespace from OpenQA.Selenium.BiDi.Extensions.Permissions to
    OpenQA.Selenium.BiDi.Permissions
  • Removed self-referential using OpenQA.Selenium.BiDi.Permissions
    directive
  • Made PermissionsModule class sealed to prevent inheritance
+2/-3     

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Jan 22, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Jan 22, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Fix typo in public method parameter
Suggestion Impact:Renamed the SetPermissionAsync parameter to "descriptor" and updated its usage when constructing SetPermissionCommandParameters.

code diff:

-    public async Task<SetPermissionResult> SetPermissionAsync(PermissionDescriptor desriptor, PermissionState state, string origin, SetPermissionOptions? options = null)
+    public async Task<SetPermissionResult> SetPermissionAsync(PermissionDescriptor descriptor, PermissionState state, string origin, SetPermissionOptions? options = null)
     {
-        var @params = new SetPermissionCommandParameters(desriptor, state, origin, options?.EmbeddedOrigin, options?.UserContext);
+        var @params = new SetPermissionCommandParameters(descriptor, state, origin, options?.EmbeddedOrigin, options?.UserContext);

Correct the typo in the parameter name desriptor to descriptor in the public
SetPermissionAsync method.

dotnet/src/webdriver/BiDi/Permissions/PermissionsModule.cs [31]

-public async Task<SetPermissionResult> SetPermissionAsync(PermissionDescriptor desriptor, PermissionState state, string origin, SetPermissionOptions? options = null)
+public async Task<SetPermissionResult> SetPermissionAsync(PermissionDescriptor descriptor, PermissionState state, string origin, SetPermissionOptions? options = null)

[Suggestion processed]

Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies a typo in the desriptor parameter of the public SetPermissionAsync method, which improves API clarity and code quality.

Low
  • Update

@nvborisenko nvborisenko merged commit baae3e8 into SeleniumHQ:trunk Jan 23, 2026
15 checks passed
@nvborisenko nvborisenko deleted the bidi-fix-permissions-module branch January 23, 2026 00:23
This was referenced Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants