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

Uwe Hermann drupal-devel at drupal.org
Mon Sep 19 00:57:51 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:   Uwe Hermann
-Status:       patch (code needs review)
+Status:       patch (code needs work)

Patch doesn't apply anymore.




Uwe Hermann



Previous comments:
------------------------------------------------------------------------

Mon, 12 Sep 2005 11:18:12 +0000 : timcn

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.







More information about the drupal-devel mailing list