? hook_access.patch Index: shazamgallery.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/shazamgallery/shazamgallery.module,v retrieving revision 1.22 diff -u -p -r1.22 shazamgallery.module --- shazamgallery.module 3 Mar 2006 14:19:16 -0000 1.22 +++ shazamgallery.module 22 Mar 2006 06:11:55 -0000 @@ -29,6 +29,23 @@ function shazamgallery_perm() { } /** + * Implementation of hook_access + */ +function shazamgallery_access($op, $node) { + global $user; + + if ($op == 'create') { + return user_access('create gallery'); + } + + if ($op == 'update' || $op == 'delete') { + if (user_access('edit own gallery') && ($user->uid == $node->uid)) { + return TRUE; + } + } +} + +/** * Implementation of hook_settings */ function shazamgallery_settings() {