// Render permission overview:
$options = array();
foreach (module_list(FALSE, FALSE, TRUE) as $module) {
if ($permissions = module_invoke($module, 'permission')) {
// List only the modules that have permissions.
dsm($module);
dsm($permissions);
}
}