Opened 6 years ago

Closed 6 years ago

#29939 closed Cleanup/optimization (fixed)

Increase Group.name max_length from 80 to 150

Reported by: John Piotrowski Owned by: Timothy Allen
Component: contrib.auth Version: 2.1
Severity: Normal Keywords: Group, Name, MaxLength
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Right now the default authorization model has Group with a name field of 80. I recently ran into an issue where my group name is longer than 80 and it just causes Django to error and fail. We use Grouper so the naming schema can be very long and i would think this would be a non-breaking change to just increase the model from Maxlength of 80 to 255.

Change History (5)

comment:1 by Timothy Allen, 6 years ago

Owner: changed from nobody to Timothy Allen
Status: newassigned
Type: BugCleanup/optimization

I believe it would be reasonable to increase the max_length to 191, to be consistent with recent changes to other fields such as username on the django.contrib.auth user model. The 191 character limit is a MySQL limitation for indexing. I will take a shot at making a patch.

comment:2 by Timothy Allen, 6 years ago

Has patch: set

Patch has been issued as a PR: https://github.com/django/django/pull/10627

comment:3 by Vishvajit Pathak, 6 years ago

Needs tests: set
Triage Stage: UnreviewedAccepted

This request looks reasonable. Although I am not sure about the max_length to be 191.

comment:4 by Tim Graham, 6 years ago

Needs tests: unset
Summary: Change the length of the Group Name from 80 to something much higher like 255Increase Group.name max_length from 80 to 150
Triage Stage: AcceptedReady for checkin

The django-developers discussion yielded a consensus to increase the max_length to 150 like the User.username and User.last_name fields.

comment:5 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In e8195540:

Fixed #29939 -- Increased Group.name max_length to 150 characters.

Note: See TracTickets for help on using tickets.
Back to Top