diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-04-21 13:56:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-04-21 13:56:38 +0000 |
commit | 7231c88a326f92bdc2b1579ac6afb8f7f568170b (patch) | |
tree | b7586493410910be188d97440dbdf1d44b084b91 /modules/profile/profile.module | |
parent | 7976678719f6e04ecda315a6088ee0eb3cfb0318 (diff) | |
download | brdo-7231c88a326f92bdc2b1579ac6afb8f7f568170b.tar.gz brdo-7231c88a326f92bdc2b1579ac6afb8f7f568170b.tar.bz2 |
- Added support for 403 handling. Patch by JonBob. As a side benefit,
administrators will be able to define a custom 403 page, just as they
can define 404 pages now.
This needs to be documented in the "Changes since / migrating to ..."
pages.
Diffstat (limited to 'modules/profile/profile.module')
-rw-r--r-- | modules/profile/profile.module | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module index cbeaccd1e..2b782b3cf 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -14,16 +14,17 @@ function profile_help($section) { } +/** + * Implementation of hook_link(). + */ function profile_link($type) { if ($type == 'system') { menu('profile', t('browse'), 'profile_browse', 0, MENU_HIDE); - if (user_access('administer users')) { - menu('admin/system/modules/profile', t('profile'), 'profile_admin_overview'); - menu('admin/system/modules/profile/add', NULL, 'profile_admin_add', 0, MENU_HIDE, MENU_LOCKED); - menu('admin/system/modules/profile/edit', NULL, 'profile_admin_edit', 0, MENU_HIDE, MENU_LOCKED); - menu('admin/system/modules/profile/delete', NULL, 'profile_admin_delete', 0, MENU_HIDE, MENU_LOCKED); - } + menu('admin/system/modules/profile', t('profile'), user_access('administer users') ? 'profile_admin_overview' : MENU_DENIED); + menu('admin/system/modules/profile/add', NULL, user_access('administer users') ? 'profile_admin_add' : MENU_DENIED, 0, MENU_HIDE, MENU_LOCKED); + menu('admin/system/modules/profile/edit', NULL, user_access('administer users') ? 'profile_admin_edit' : MENU_DENIED, 0, MENU_HIDE, MENU_LOCKED); + menu('admin/system/modules/profile/delete', NULL, user_access('administer users') ? 'profile_admin_delete' : MENU_DENIED, 0, MENU_HIDE, MENU_LOCKED); } } |