[drupal-devel] [feature] Allow descriptions for permissions

timcn drupal-devel at drupal.org
Mon Sep 12 11:18:16 UTC 2005


Issue status update for 
http://drupal.org/node/30984
Post a follow up: 
http://drupal.org/project/comments/add/30984

 Project:      Drupal
 Version:      cvs
 Component:    user.module
 Category:     feature requests
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  timcn
 Updated by:   timcn
 Status:       patch (code needs review)
 Attachment:   http://drupal.org/files/issues/user_32.patch (1.59 KB)

I extended the user.module in order to allow descriptions for
permissions because it is sometimes difficult to figure out what a
certain permission really does. In hook_perm() you can now return an
array like that (example taken from node.module):

<?php
function node_perm() {
  return array(
    'administer nodes' => 'Allows editing and deleting of all nodes',
    'access content' => 'Allows to view content'
  );
}
?>




You can also freely mix "described" permissions with old/regular ones;
i.e. it does not break the current permission system.




timcn




More information about the drupal-devel mailing list