Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | ctools-1989476-3.patch | 1.23 KB | tim.plunkett |
#1 | ctools-1989476-1.patch | 1.33 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettAnd the patch.
Comment #2
tim.plunkettSee #1989478: Implement the new 'create content access' callback for content types for an example
Comment #3
tim.plunkettNow passing $type and $subtype instead.
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedThat works for me!
Comment #5
tim.plunkettPushed http://drupalcode.org/project/ctools.git/commit/876c1a8