Changeset 5538

Show
Ignore:
Timestamp:
03/20/07 14:22:41 (2 years ago)
Author:
rambo
Message:

support to define extra (not of ccurrent component) privileges to handle in ACL editor via manifest

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/midgard.admin.acl/acl_editor.php

    r5204 r5538  
    9696        { 
    9797            $this->_privileges[] = $privilege; 
     98        } 
     99        /* 
     100        echo "DEBUG: manifest <pre>\n"; 
     101        print_r($current_manifest); 
     102        echo "</pre>\n"; 
     103        */ 
     104        if (   isset($current_manifest->customdata['midgard.admin.acl']) 
     105            && isset($current_manifest->customdata['midgard.admin.acl']['extra_privileges'])) 
     106        { 
     107            foreach ($current_manifest->customdata['midgard.admin.acl']['extra_privileges'] as $privilege) 
     108            { 
     109                if (!strpos($privilege, ':')) 
     110                { 
     111                    // Only component specified 
     112                    // TODO: load components manifest and add privileges from there 
     113                    continue; 
     114                } 
     115                $this->_privileges[] = $privilege; 
     116            } 
    98117        } 
    99118