File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 417417| CREATE TABLE `access` (
418418| `id` INT(11) unsigned NOT NULL AUTO_INCREMENT,
419419| `key` VARCHAR(40) NOT NULL DEFAULT '',
420+ | `all_access` TINYINT(1) NOT NULL DEFAULT '0',
420421| `controller` VARCHAR(50) NOT NULL DEFAULT '',
421422| `date_created` DATETIME DEFAULT NULL,
422423| `date_modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
Original file line number Diff line number Diff line change @@ -2153,6 +2153,16 @@ protected function _check_access()
21532153 {
21542154 return TRUE ;
21552155 }
2156+
2157+ //check if the key has all_access
2158+ $ accessRow = $ this ->rest ->db
2159+ ->where ('key ' , $ this ->rest ->key )
2160+ ->get ($ this ->config ->item ('rest_access_table ' ))->row_array ();
2161+
2162+ if (!empty ($ accessRow ) && !empty ($ accessRow ['all_access ' ]))
2163+ {
2164+ return TRUE ;
2165+ }
21562166
21572167 // Fetch controller based on path and controller name
21582168 $ controller = implode (
You can’t perform that action at this time.
0 commit comments