Changeset 3140
- Timestamp:
- 05/02/08 13:24:46 (2 months ago)
- Files:
-
- trunk/Solar/Access/Adapter/File.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Solar/Access/Adapter/File.php
r2926 r3140 13 13 * allow role sysadmin * * * 14 14 * allow handle + Solar_App_Bookmarks * * 15 * deny userboshag Solar_App_Bookmarks edit *15 * deny handle boshag Solar_App_Bookmarks edit * 16 16 * 17 17 * @category Solar … … 59 59 throw $this->_exception( 60 60 'ERR_FILE_NOT_READABLE', 61 array('file' => $file) 61 array( 62 'file' => $this->_config['file'], 63 'realpath' => $file, 64 ) 62 65 ); 63 66 } … … 74 77 75 78 foreach ($lines as $line) { 79 80 $trim = trim($line); 81 82 // allow blank lines 83 if ($trim == '') { 84 continue; 85 } 86 87 // allow comment lines 88 $char = substr($trim, 0, 1); 89 if ($char == '#') { 90 continue; 91 } 92 76 93 // $info keys are ... 77 94 // 0 => "allow" or "deny" … … 86 103 $info[1] == 'handle' && $info[2] == '*' || // any user (incl anon) 87 104 $info[1] == 'role' && in_array($info[2], $roles) || // direct role match 88 $info[ 2] == 'role' && $info[2] == '*') { // any role (incl anon)105 $info[1] == 'role' && $info[2] == '*') { // any role (incl anon) 89 106 90 107 // keep the line
