Summary
Default Permissions is a simple module designed for distribution developers who
want to manage a default list of module permissions in a single location that
is easy to maintain. It does not provide a UI of any kind.
This module was developed because using Features to manage default permissions
in the context of a distribution is problematic as Features introduces
dependencies and permissions are "overridden" if they change from the provided
defaults. Developers interested in this module may also want to review
http://drupal.org/project/defaultconfig, which solves the problem with overrides
but isn't suitable for centralizing all default permissions into a single
module without introducing dependencies.
Usage
In your custom module implement hook_default_permissions() and return a nested
array of permissions keyed by module according to the following pattern:
<?php
$permissions['poll']['inspect all votes'] = array('editor', 'contributor');
?>Each time a module is enabled this hook will fire. If the module being enabled
matches a module key in the $permissions array the corresponding permission(s)
will be granted to the role(s) specified. To allow for more complex situations
the array of modules is passed to the hook.