Lack of interest Increase limit for permission ID length

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.
This suggestion has been closed. Votes are no longer accepted.
There's potentially scope to increase it, but it'd be kind of risky to do so in a third point release.

For example, it would mean that any add-on that includes a permission ID that is longer than 25 characters would not be installable on XF versions prior to when that change was made. So then developers would have to remember to restrict their add-on so it is only installable on certain versions. That's fine, if you understand the context of the permission ID length change, but not so good if, essentially, some developer in the future doesn't see this bug report or release notes.

It's also likely possible that we'd need to change a heck of a lot of database tables and entities to accommodate it and I'm not sure off the top of my head if there are any other assumptions regarding the permission length. We'd probably need to change the permission_group_id value too which is also at 25 (we've had requests about that in the past, I think).

We also probably wouldn't be able to increase it by much. The main reason that it's currently quite short (and may apply to other types of content too) is that we have to automatically generate a phrase name:
PHP:
public function getPhraseName()
{
   return 'permission.' . $this->permission_group_id . '_' . $this->permission_id;
}
Phrase names have a maximum length of 100 so the above string can already be as much as 62 characters. That leaves 38 characters wiggle room, and if we changed both IDs here we'd only be increasing the IDs to a max length of 44... well, actually, 40 because having a max length of 44 seems a bit weird. So really, it's a lot of effort to essentially add an additional 15 characters which, for most, probably won't make a huge amount of difference.

I'll move this to suggestions though. We could consider it for a future version, especially if we ever increase the phrase name limit.
 
Top Bottom