Skip to content

Add is_anonymous, is_active, and is_superuser as built-in user attribute permissions#215

Merged
joshuadavidthomas merged 3 commits intomainfrom
claude/add-user-permissions-zm75Q
Feb 28, 2026
Merged

Add is_anonymous, is_active, and is_superuser as built-in user attribute permissions#215
joshuadavidthomas merged 3 commits intomainfrom
claude/add-user-permissions-zm75Q

Conversation

@joshuadavidthomas
Copy link
Owner

No description provided.

…ute permissions

Expand the hardcoded permission attribute list to include all standard Django
user model boolean attributes. Previously only is_authenticated and is_staff
were recognized as direct attribute lookups; other attributes like is_anonymous
fell through to user.has_perm() which returned incorrect results.

Extract the attribute list into a USER_ATTRIBUTE_PERMISSIONS frozenset constant
for clarity, O(1) lookup, and maintainability.

https://claude.ai/code/session_014S8yKfjq3zDviozu8GEn9s
@joshuadavidthomas joshuadavidthomas merged commit c709f1d into main Feb 28, 2026
22 checks passed
@joshuadavidthomas joshuadavidthomas deleted the claude/add-user-permissions-zm75Q branch February 28, 2026 16:55
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.

2 participants