[development] Changing Roles (was Deleting Cached Permissions)
Gerhard Killesreiter
gerhard at killesreiter.de
Tue Aug 28 14:29:40 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David Metzler schrieb:
>
> On Aug 28, 2007, at 4:04 AM, Karoly Negyesi wrote:
>
>>
>> Just overdefine the menu item that you want to change and define your
>> access mechanism. Because node/add is defined as cached you can put
>> your menu definiton in !$may_cache with the same path -- it will
>> overwrite the original definition. In Drupal 6, you want to do a
>
> Karoly, thanks for bringing up some options for a solution. This might
> work with the new menu system, provided we have a way to override other
> modules menus access control.
This has worked since Drupal 4.x. Overriding the menu path is a way to
replace entire pages from Drupal core.
> Is that what you're suggesting? But what
> Ron is trying to do is override permissions for other modules, (book,
> page,etc.). That means that Ron needs a way to overdefine all of the
> menu items for node/*/add. Will that work, or does the uniquely defined
> menu item supercede the other.
IMO he only needs to copy the logic in node.module's hook_menu and make
sure his module has a higher weight.
>
> Would overriding these menu items be thought of as a "supported way" of
> writing a module?
It's a bit nasty, but I have done so several times. Mostly for client
projects where one standard page wasn't acceptable to the client or
wasn't modifiable in another way.
Cheers,
Gerhard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFG1DFUfg6TFvELooQRAnUXAJ9ySp5/fQjCEh30oyl0qfLUI3o68ACgvhzi
ma0e159MSbvfBqfxbt4/+A8=
=u5RP
-----END PGP SIGNATURE-----
More information about the development
mailing list