Closed (fixed)
Project:
Drupal core
Version:
4.6.3
Component:
menu system
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
30 Aug 2005 at 22:17 UTC
Updated:
7 Dec 2005 at 07:40 UTC
As I'm somehow new to drupal and not 100% sure if I'm doing the right thing please be indulgent. I wrote a patch to enable access control on selfmade blocks for menu.module.
Till now it was possible to set blocks to certain pages but not depending on user roles. With this patch you will have an entry for each selfmade block under "access control -> menu modul", each starting with "show".
| Comment | File | Size | Author |
|---|---|---|---|
| menu.module_1.patch | 957 bytes | Ralf Ollig |
Comments
Comment #1
Bèr Kessels commentedIn the blocks admin you can add PHP. So you can set this there too. I dislike the idea of making an exeptional rule for navigation block.
Also, your spaces in the code ar esomewhat strange. PLease use two spaces for identation
Comment #2
Ralf Ollig commentedBut I have to do it for each and every block, this isn't quite useable. I'm working on a project with 10 differnt userroles, and each role must to be able to have it's on blocks. It's more flexible to add it once instead of adding it for every block, right?
This is done before in the menu.module, I didn't understood it too.
Sorry, diff screwd up the indentation.
Comment #3
rrichard63 commentedAfter installing this patch, I got several instances of the following error message: "Cannot modify header information - headers already sent by (output started at /home/.../modules/menu.module:542) in /home/.../includes/common.inc on line 192."
followed by one instance of: "call_user_func_array(): First argumented is expected to be a valid callback, 'block_admin' was given in /home/.../includes/menu.inc on line 354"
Needless to say, I uninstalled the patch. I do, however, desperately need this feature. There are several other patches offered in previous forum posts. I guess I'll try those.
It seems to me that enough folks have asked for this (and some have attempted to do it themselves) that it is time to do it right, test it thoroughly, and make it official. Thanks in advance.
--Bob Richard
Comment #4
moshe weitzman commentedthis shoudl be handled on the block admin page with a checkbox for each role. lets not clutter the permissions page with this info. also, i'd rather not see special case code for user.module.
Comment #5
Ralf Ollig commentedI guess this can be discussed, I think it's quite hard to set permissons on different sites for every feature. One central approach within the permisson page would be great but maybe with different "areas" or "subcategories/menus".
If there would be checkboxes it would clutter this page to, think of maybe 10 different user roles. A "multi select" box imho fits this need better.
You're right there shouldn't be special cases.
Comment #6
chx commentedFeatures do not go against 4.6 and in 4.7 you can code bloack visiblity w/ PHP.
Comment #7
(not verified) commented