Opened 4 years ago

Closed 4 years ago

#26388 closed Cleanup/optimization (duplicate)

make is_anonymous and is_authenticated properties

Reported by: Cody Childers Owned by: Cody Childers
Component: contrib.auth Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

is_anonymous and is_authenticated on the User models should be properties because they're used like them and they just return True or False. It becomes difficult to use in the shell seeing user.is_active behave like expected but then user.is_anonymous is requiring user.is_anonymous() which isn't fitting any logical pattern

Change History (3)

comment:1 Changed 4 years ago by Cody Childers

Type: UncategorizedCleanup/optimization

comment:2 Changed 4 years ago by Tim Graham

Component: Uncategorizedcontrib.auth

Duplicate of #25847

comment:3 Changed 4 years ago by Tim Graham

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top