Skip to content

Enforce Strict Type-Safety in Authorization Module#859

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Muhamadmust:refactor/fix-acl-ts-nocheck-security
Jun 29, 2026
Merged

Enforce Strict Type-Safety in Authorization Module#859
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Muhamadmust:refactor/fix-acl-ts-nocheck-security

Conversation

@Muhamadmust

Copy link
Copy Markdown
Contributor

PR: Enforce Strict Type-Safety in Authorization Module (#707)

Description

Removes the global typescript bypass (// @ts-nocheck) inside the core Access Control List (ACL) system, fixing all resulting compiler errors to guarantee reliable, type-safe role-based access checks.

Changes Implemented

  • Hardened acl.ts Type Profile: Eliminated // @ts-nocheck and // @ts-ignore overrides to run structural validation over permission routines.
  • Added Explicit Schema Binding: Integrated strict typing imports for Permission and UserRole enums across active lookup schemas.
  • Secured Role Evaluators: Refactored permission evaluation routines into strictly typed function signatures.
  • Added Fallback Protections: Patched ROLES_PERMISSIONS resolution hooks with a null-coalescing layout to safely evaluate unknown or corrupted role requests.

Verification Checklist

  • Command tsc --noEmit returns zero compiler warnings or errors in acl.ts.
  • All bypass instructions (@ts-nocheck, @ts-ignore) are completely removed.
  • Permission mapping evaluation verified via explicit enum validations.

Closes #707

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@Muhamadmust Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER RUKAYAT-CODER merged commit b546411 into rinafcode:main Jun 29, 2026
5 checks passed
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.

[Bug] @ts-nocheck in acl.ts disables TypeScript for the entire authorization module

2 participants