|
Though it has been tested and is believed to be safe, this code was written by a non-professional & inexperienced programmer. Use at your own Risk. I created this script to allow ACL-limited users to create groups while automatically creating the necessary ACL role, permission, and assignment in order to allow that user to actually use the group they just created. (Strangely, the existing 'Edit User Groups' Drupal permission doesn't ensure this.) You will almost certainly need to modify the first require_once() to specify the path to your own settings file. Note that the code that generates the multi-select (which allows the user to specify what groups should have permission to view this group being created) is written specific to only include groups with have the case insensitive string 'staff'in the title. You may want to modify or eliminate this. Look for the foreach block which includes: This was created & tested on:
It is intended to be run in a Drupal block. You'll want to limit it to a special Drupal Role to have any sense of security. Thanks to Donald Lobo for help with this, but any errors are solely mine. Corrections & Improvements are welcomed. - Matt [at] NinjitsuHosting [dot] com |
Create Group with ACL Permissions
Labels
