shorturl implements hook_init()
within that function, menu_get_item() is invoked
this triggers the access callback for node/add/$foo (node_access) before OGUR roles are initialized

changing the module weight of OGUR to be heavier than shorturl works around this successfully, but i don't know if that's an ideal solution.

I can think of a few other approaches to solve this, of which i'm not really sure the feasibility:

  • hook_menu_alter to override node_access
  • something with hook_boot() instead of hook_init()
  • ???
  • profit

If a maintainer can comment on this, i am happy to implement (or try to implement) a patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

What weight is shorturl using?

AaronBauman’s picture

here's the patch for changing the weight.

sun’s picture

Status: Active » Needs work

1) Can you answer the question in #1 ?

2) The patch is doing the opposite of what needs to be done (increasing instead of decreasing).

AaronBauman’s picture

Status: Needs work » Needs review
FileSize
820 bytes

1) -100
2) heh, oops. updated patch attached.