Skip to content

Conversation

@arnav-makkar
Copy link
Contributor

Brief summary of changes

Includes permissions that are not linked to any module by adjusting the WHERE clause to allow NULL active states.
This ensures all permissions appear on the frontend even if they don't have an associated module.

Link(s) to related issue(s)

@github-actions github-actions bot added the Language: PHP PR or issue that update PHP code label Jan 22, 2026
@arnav-makkar
Copy link
Contributor Author

Test failure was expected after the initial query fix.

Previously WHERE m.Active='Y' made the LEFT JOIN on modules behave like an INNER JOIN, so permissions with no matching module row were silently dropped.

After changing to WHERE (m.Active='Y' OR m.Active IS NULL), those permissions are correctly included again. The unit test fixture contains such a case, so testGetPermissionsVerbose() had to be updated to match the corrected output.

All tests pass now, ready for review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language: PHP PR or issue that update PHP code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[user_accounts] Permissions without a linked module magically disappear

1 participant