I would like to give authors access to add panes to Panels, but need to be able to restrict certain content types per role.

This patch adds a new 'create content access' key that can be used to add a callback.

The callback will get the string 'create' and the content type ID. The 'create' string is so that it can be passed to most generic access checkers, that expect an $op.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

FileSize
1.33 KB

And the patch.

tim.plunkett’s picture

tim.plunkett’s picture

FileSize
1.23 KB

Now passing $type and $subtype instead.

merlinofchaos’s picture

Status: Needs review » Reviewed & tested by the community

That works for me!

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.