Stop abbreviating permissions to perm
catch - July 1, 2009 - 09:01
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | user.module |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
| Issue tags: | Favorite-of-Dries |
Description
Splitting off from #306027: user_modules_uninistalled() is missing.
So we have hook_perm()
This could be hook_permission() hook_permissions() or hook_permissions_info()

#1
#2
hook_permission() seems more in line with core -- e.g. hook_user, hook_block...
#3
Initial attempt at renaming hook_perm to hook_permission, hope I got them all...
#4
Yes, p-uh-lease! :)
#5
There is a stray user_admin_perm() menu callback that is unrelated. Otherwise, the patch caught all instances.
See #510740: Rename user_admin_perm() for that. Otherwise RTBC.
#6
Committed to CVS HEAD. Thanks catch.
We need to update the upgrade instructions in the handbook so I'm marking this 'code needs work'.
#7
Done.
#8
#9
Shouldn't this be hook_permission_info(), since we provide information about permissions and do not process anything in there?
#10
@Xano
I hope not. By that standard, we would have hook_menu_info() and hook_theme_info() as well., plus others, I am sure.
Do we have any agreed upon standards for function naming that we can reference here?
#11
Crell's arguing for a lot of these 'called once, cached, never called again' hooks to all be renamed to hook_$hook_info() - not sure if there's a renaming issue anywhere though - but it's not really connected to this specific one anyway.
#12
OK, so we can clean this up as part of that initiative and don't need to discuss here?
#13
I think so yeah.
#14
Automatically closed -- issue fixed for 2 weeks with no activity.